// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Admin Directory API Version directory_v1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://developers.google.com/admin-sdk/directory/'>Admin Directory API</a>
 *      <tr><th>API Version<td>directory_v1
 *      <tr><th>API Rev<td>20170216 (777)
 *      <tr><th>API Docs
 *          <td><a href='https://developers.google.com/admin-sdk/directory/'>
 *              https://developers.google.com/admin-sdk/directory/</a>
 *      <tr><th>Discovery Name<td>admin
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Admin Directory API can be found at
 * <a href='https://developers.google.com/admin-sdk/directory/'>https://developers.google.com/admin-sdk/directory/</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.Admin.Directory.directory_v1
{
    /// <summary>The Directory Service.</summary>
    public class DirectoryService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "directory_v1";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public DirectoryService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public DirectoryService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            asps = new AspsResource(this);
            channels = new ChannelsResource(this);
            chromeosdevices = new ChromeosdevicesResource(this);
            customers = new CustomersResource(this);
            domainAliases = new DomainAliasesResource(this);
            domains = new DomainsResource(this);
            groups = new GroupsResource(this);
            members = new MembersResource(this);
            mobiledevices = new MobiledevicesResource(this);
            notifications = new NotificationsResource(this);
            orgunits = new OrgunitsResource(this);
            privileges = new PrivilegesResource(this);
            resources = new ResourcesResource(this);
            roleAssignments = new RoleAssignmentsResource(this);
            roles = new RolesResource(this);
            schemas = new SchemasResource(this);
            tokens = new TokensResource(this);
            users = new UsersResource(this);
            verificationCodes = new VerificationCodesResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "admin"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/admin/directory/v1/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "admin/directory/v1/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Admin Directory API.</summary>
        public class Scope
        {
            /// <summary>View and manage customer related information</summary>
            public static string AdminDirectoryCustomer = "https://www.googleapis.com/auth/admin.directory.customer";

            /// <summary>View customer related information</summary>
            public static string AdminDirectoryCustomerReadonly = "https://www.googleapis.com/auth/admin.directory.customer.readonly";

            /// <summary>View and manage your Chrome OS devices' metadata</summary>
            public static string AdminDirectoryDeviceChromeos = "https://www.googleapis.com/auth/admin.directory.device.chromeos";

            /// <summary>View your Chrome OS devices' metadata</summary>
            public static string AdminDirectoryDeviceChromeosReadonly = "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly";

            /// <summary>View and manage your mobile devices' metadata</summary>
            public static string AdminDirectoryDeviceMobile = "https://www.googleapis.com/auth/admin.directory.device.mobile";

            /// <summary>Manage your mobile devices by performing administrative tasks</summary>
            public static string AdminDirectoryDeviceMobileAction = "https://www.googleapis.com/auth/admin.directory.device.mobile.action";

            /// <summary>View your mobile devices' metadata</summary>
            public static string AdminDirectoryDeviceMobileReadonly = "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly";

            /// <summary>View and manage the provisioning of domains for your customers</summary>
            public static string AdminDirectoryDomain = "https://www.googleapis.com/auth/admin.directory.domain";

            /// <summary>View domains related to your customers</summary>
            public static string AdminDirectoryDomainReadonly = "https://www.googleapis.com/auth/admin.directory.domain.readonly";

            /// <summary>View and manage the provisioning of groups on your domain</summary>
            public static string AdminDirectoryGroup = "https://www.googleapis.com/auth/admin.directory.group";

            /// <summary>View and manage group subscriptions on your domain</summary>
            public static string AdminDirectoryGroupMember = "https://www.googleapis.com/auth/admin.directory.group.member";

            /// <summary>View group subscriptions on your domain</summary>
            public static string AdminDirectoryGroupMemberReadonly = "https://www.googleapis.com/auth/admin.directory.group.member.readonly";

            /// <summary>View groups on your domain</summary>
            public static string AdminDirectoryGroupReadonly = "https://www.googleapis.com/auth/admin.directory.group.readonly";

            /// <summary>View and manage notifications received on your domain</summary>
            public static string AdminDirectoryNotifications = "https://www.googleapis.com/auth/admin.directory.notifications";

            /// <summary>View and manage organization units on your domain</summary>
            public static string AdminDirectoryOrgunit = "https://www.googleapis.com/auth/admin.directory.orgunit";

            /// <summary>View organization units on your domain</summary>
            public static string AdminDirectoryOrgunitReadonly = "https://www.googleapis.com/auth/admin.directory.orgunit.readonly";

            /// <summary>View and manage the provisioning of calendar resources on your domain</summary>
            public static string AdminDirectoryResourceCalendar = "https://www.googleapis.com/auth/admin.directory.resource.calendar";

            /// <summary>View calendar resources on your domain</summary>
            public static string AdminDirectoryResourceCalendarReadonly = "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly";

            /// <summary>Manage delegated admin roles for your domain</summary>
            public static string AdminDirectoryRolemanagement = "https://www.googleapis.com/auth/admin.directory.rolemanagement";

            /// <summary>View delegated admin roles for your domain</summary>
            public static string AdminDirectoryRolemanagementReadonly = "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly";

            /// <summary>View and manage the provisioning of users on your domain</summary>
            public static string AdminDirectoryUser = "https://www.googleapis.com/auth/admin.directory.user";

            /// <summary>View and manage user aliases on your domain</summary>
            public static string AdminDirectoryUserAlias = "https://www.googleapis.com/auth/admin.directory.user.alias";

            /// <summary>View user aliases on your domain</summary>
            public static string AdminDirectoryUserAliasReadonly = "https://www.googleapis.com/auth/admin.directory.user.alias.readonly";

            /// <summary>View users on your domain</summary>
            public static string AdminDirectoryUserReadonly = "https://www.googleapis.com/auth/admin.directory.user.readonly";

            /// <summary>Manage data access permissions for users on your domain</summary>
            public static string AdminDirectoryUserSecurity = "https://www.googleapis.com/auth/admin.directory.user.security";

            /// <summary>View and manage the provisioning of user schemas on your domain</summary>
            public static string AdminDirectoryUserschema = "https://www.googleapis.com/auth/admin.directory.userschema";

            /// <summary>View user schemas on your domain</summary>
            public static string AdminDirectoryUserschemaReadonly = "https://www.googleapis.com/auth/admin.directory.userschema.readonly";

        }



        private readonly AspsResource asps;

        /// <summary>Gets the Asps resource.</summary>
        public virtual AspsResource Asps
        {
            get { return asps; }
        }

        private readonly ChannelsResource channels;

        /// <summary>Gets the Channels resource.</summary>
        public virtual ChannelsResource Channels
        {
            get { return channels; }
        }

        private readonly ChromeosdevicesResource chromeosdevices;

        /// <summary>Gets the Chromeosdevices resource.</summary>
        public virtual ChromeosdevicesResource Chromeosdevices
        {
            get { return chromeosdevices; }
        }

        private readonly CustomersResource customers;

        /// <summary>Gets the Customers resource.</summary>
        public virtual CustomersResource Customers
        {
            get { return customers; }
        }

        private readonly DomainAliasesResource domainAliases;

        /// <summary>Gets the DomainAliases resource.</summary>
        public virtual DomainAliasesResource DomainAliases
        {
            get { return domainAliases; }
        }

        private readonly DomainsResource domains;

        /// <summary>Gets the Domains resource.</summary>
        public virtual DomainsResource Domains
        {
            get { return domains; }
        }

        private readonly GroupsResource groups;

        /// <summary>Gets the Groups resource.</summary>
        public virtual GroupsResource Groups
        {
            get { return groups; }
        }

        private readonly MembersResource members;

        /// <summary>Gets the Members resource.</summary>
        public virtual MembersResource Members
        {
            get { return members; }
        }

        private readonly MobiledevicesResource mobiledevices;

        /// <summary>Gets the Mobiledevices resource.</summary>
        public virtual MobiledevicesResource Mobiledevices
        {
            get { return mobiledevices; }
        }

        private readonly NotificationsResource notifications;

        /// <summary>Gets the Notifications resource.</summary>
        public virtual NotificationsResource Notifications
        {
            get { return notifications; }
        }

        private readonly OrgunitsResource orgunits;

        /// <summary>Gets the Orgunits resource.</summary>
        public virtual OrgunitsResource Orgunits
        {
            get { return orgunits; }
        }

        private readonly PrivilegesResource privileges;

        /// <summary>Gets the Privileges resource.</summary>
        public virtual PrivilegesResource Privileges
        {
            get { return privileges; }
        }

        private readonly ResourcesResource resources;

        /// <summary>Gets the Resources resource.</summary>
        public virtual ResourcesResource Resources
        {
            get { return resources; }
        }

        private readonly RoleAssignmentsResource roleAssignments;

        /// <summary>Gets the RoleAssignments resource.</summary>
        public virtual RoleAssignmentsResource RoleAssignments
        {
            get { return roleAssignments; }
        }

        private readonly RolesResource roles;

        /// <summary>Gets the Roles resource.</summary>
        public virtual RolesResource Roles
        {
            get { return roles; }
        }

        private readonly SchemasResource schemas;

        /// <summary>Gets the Schemas resource.</summary>
        public virtual SchemasResource Schemas
        {
            get { return schemas; }
        }

        private readonly TokensResource tokens;

        /// <summary>Gets the Tokens resource.</summary>
        public virtual TokensResource Tokens
        {
            get { return tokens; }
        }

        private readonly UsersResource users;

        /// <summary>Gets the Users resource.</summary>
        public virtual UsersResource Users
        {
            get { return users; }
        }

        private readonly VerificationCodesResource verificationCodes;

        /// <summary>Gets the VerificationCodes resource.</summary>
        public virtual VerificationCodesResource VerificationCodes
        {
            get { return verificationCodes; }
        }
    }

    ///<summary>A base abstract class for Directory requests.</summary>
    public abstract class DirectoryBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new DirectoryBaseServiceRequest instance.</summary>
        protected DirectoryBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes Directory parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "asps" collection of methods.</summary>
    public class AspsResource
    {
        private const string Resource = "asps";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public AspsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Delete an ASP issued by a user.</summary>
        /// <param name="userKey">Identifies the user in the API request. The value can be the user's primary email address,
        /// alias email address, or unique user ID.</param>
        /// <param name="codeId">The unique ID of the ASP to be
        /// deleted.</param>
        public virtual DeleteRequest Delete(string userKey, int codeId)
        {
            return new DeleteRequest(service, userKey, codeId);
        }

        /// <summary>Delete an ASP issued by a user.</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string userKey, int codeId)
                : base(service)
            {
                UserKey = userKey;
                CodeId = codeId;
                InitParameters();
            }


            /// <summary>Identifies the user in the API request. The value can be the user's primary email address,
            /// alias email address, or unique user ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }

            /// <summary>The unique ID of the ASP to be deleted.</summary>
            [Google.Apis.Util.RequestParameterAttribute("codeId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual int CodeId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/asps/{codeId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "codeId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "codeId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Get information about an ASP issued by a user.</summary>
        /// <param name="userKey">Identifies the user in the API request. The value can be the user's primary email address,
        /// alias email address, or unique user ID.</param>
        /// <param name="codeId">The unique ID of the ASP.</param>
        public virtual GetRequest Get(string userKey, int codeId)
        {
            return new GetRequest(service, userKey, codeId);
        }

        /// <summary>Get information about an ASP issued by a user.</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Asp>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string userKey, int codeId)
                : base(service)
            {
                UserKey = userKey;
                CodeId = codeId;
                InitParameters();
            }


            /// <summary>Identifies the user in the API request. The value can be the user's primary email address,
            /// alias email address, or unique user ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }

            /// <summary>The unique ID of the ASP.</summary>
            [Google.Apis.Util.RequestParameterAttribute("codeId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual int CodeId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/asps/{codeId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "codeId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "codeId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>List the ASPs issued by a user.</summary>
        /// <param name="userKey">Identifies the user in the API request. The value can be the user's primary email address,
        /// alias email address, or unique user ID.</param>
        public virtual ListRequest List(string userKey)
        {
            return new ListRequest(service, userKey);
        }

        /// <summary>List the ASPs issued by a user.</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Asps>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string userKey)
                : base(service)
            {
                UserKey = userKey;
                InitParameters();
            }


            /// <summary>Identifies the user in the API request. The value can be the user's primary email address,
            /// alias email address, or unique user ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/asps"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "channels" collection of methods.</summary>
    public class ChannelsResource
    {
        private const string Resource = "channels";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ChannelsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Stop watching resources through this channel</summary>
        /// <param name="body">The body of the request.</param>
        public virtual StopRequest Stop(Google.Apis.Admin.Directory.directory_v1.Data.Channel body)
        {
            return new StopRequest(service, body);
        }

        /// <summary>Stop watching resources through this channel</summary>
        public class StopRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Stop request.</summary>
            public StopRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Channel body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Channel Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "stop"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "/admin/directory_v1/channels/stop"; }
            }

            /// <summary>Initializes Stop parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }
    }

    /// <summary>The "chromeosdevices" collection of methods.</summary>
    public class ChromeosdevicesResource
    {
        private const string Resource = "chromeosdevices";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ChromeosdevicesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Take action on Chrome OS Device</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="resourceId">Immutable
        /// id of Chrome OS Device</param>
        public virtual ActionRequest Action(Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDeviceAction body, string customerId, string resourceId)
        {
            return new ActionRequest(service, body, customerId, resourceId);
        }

        /// <summary>Take action on Chrome OS Device</summary>
        public class ActionRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Action request.</summary>
            public ActionRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDeviceAction body, string customerId, string resourceId)
                : base(service)
            {
                CustomerId = customerId;
                ResourceId = resourceId;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Immutable id of Chrome OS Device</summary>
            [Google.Apis.Util.RequestParameterAttribute("resourceId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ResourceId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDeviceAction Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "action"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/devices/chromeos/{resourceId}/action"; }
            }

            /// <summary>Initializes Action parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "resourceId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "resourceId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve Chrome OS Device</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="deviceId">Immutable id
        /// of Chrome OS Device</param>
        public virtual GetRequest Get(string customerId, string deviceId)
        {
            return new GetRequest(service, customerId, deviceId);
        }

        /// <summary>Retrieve Chrome OS Device</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string customerId, string deviceId)
                : base(service)
            {
                CustomerId = customerId;
                DeviceId = deviceId;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Immutable id of Chrome OS Device</summary>
            [Google.Apis.Util.RequestParameterAttribute("deviceId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DeviceId { get; private set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and
                /// user)</summary>
                [Google.Apis.Util.StringValueAttribute("BASIC")]
                BASIC,
                /// <summary>Includes all metadata fields</summary>
                [Google.Apis.Util.StringValueAttribute("FULL")]
                FULL,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/devices/chromeos/{deviceId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "deviceId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "deviceId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve all Chrome OS Devices of a customer (paginated)</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        public virtual ListRequest List(string customerId)
        {
            return new ListRequest(service, customerId);
        }

        /// <summary>Retrieve all Chrome OS Devices of a customer (paginated)</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevices>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string customerId)
                : base(service)
            {
                CustomerId = customerId;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Maximum number of results to return. Default is 100</summary>
            /// [minimum: 1]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Column to use for sorting results</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderBy", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<OrderByEnum> OrderBy { get; set; }

            /// <summary>Column to use for sorting results</summary>
            public enum OrderByEnum
            {
                /// <summary>Chromebook location as annotated by the administrator.</summary>
                [Google.Apis.Util.StringValueAttribute("annotatedLocation")]
                AnnotatedLocation,
                /// <summary>Chromebook user as annotated by administrator.</summary>
                [Google.Apis.Util.StringValueAttribute("annotatedUser")]
                AnnotatedUser,
                /// <summary>Chromebook last sync.</summary>
                [Google.Apis.Util.StringValueAttribute("lastSync")]
                LastSync,
                /// <summary>Chromebook notes as annotated by the administrator.</summary>
                [Google.Apis.Util.StringValueAttribute("notes")]
                Notes,
                /// <summary>Chromebook Serial Number.</summary>
                [Google.Apis.Util.StringValueAttribute("serialNumber")]
                SerialNumber,
                /// <summary>Chromebook status.</summary>
                [Google.Apis.Util.StringValueAttribute("status")]
                Status,
                /// <summary>Chromebook support end date.</summary>
                [Google.Apis.Util.StringValueAttribute("supportEndDate")]
                SupportEndDate,
            }

            /// <summary>Token to specify next page in the list</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and
                /// user)</summary>
                [Google.Apis.Util.StringValueAttribute("BASIC")]
                BASIC,
                /// <summary>Includes all metadata fields</summary>
                [Google.Apis.Util.StringValueAttribute("FULL")]
                FULL,
            }

            /// <summary>Search string in the format given at
            /// http://support.google.com/chromeos/a/bin/answer.py?hl=en=1698333</summary>
            [Google.Apis.Util.RequestParameterAttribute("query", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Query { get; set; }

            /// <summary>Whether to return results in ascending or descending order. Only of use when orderBy is also
            /// used</summary>
            [Google.Apis.Util.RequestParameterAttribute("sortOrder", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<SortOrderEnum> SortOrder { get; set; }

            /// <summary>Whether to return results in ascending or descending order. Only of use when orderBy is also
            /// used</summary>
            public enum SortOrderEnum
            {
                /// <summary>Ascending order.</summary>
                [Google.Apis.Util.StringValueAttribute("ASCENDING")]
                ASCENDING,
                /// <summary>Descending order.</summary>
                [Google.Apis.Util.StringValueAttribute("DESCENDING")]
                DESCENDING,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/devices/chromeos"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderBy", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderBy",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "query", new Google.Apis.Discovery.Parameter
                    {
                        Name = "query",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "sortOrder", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sortOrder",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update Chrome OS Device. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="deviceId">Immutable id
        /// of Chrome OS Device</param>
        public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice body, string customerId, string deviceId)
        {
            return new PatchRequest(service, body, customerId, deviceId);
        }

        /// <summary>Update Chrome OS Device. This method supports patch semantics.</summary>
        public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice body, string customerId, string deviceId)
                : base(service)
            {
                CustomerId = customerId;
                DeviceId = deviceId;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Immutable id of Chrome OS Device</summary>
            [Google.Apis.Util.RequestParameterAttribute("deviceId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DeviceId { get; private set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and
                /// user)</summary>
                [Google.Apis.Util.StringValueAttribute("BASIC")]
                BASIC,
                /// <summary>Includes all metadata fields</summary>
                [Google.Apis.Util.StringValueAttribute("FULL")]
                FULL,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/devices/chromeos/{deviceId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "deviceId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "deviceId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update Chrome OS Device</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="deviceId">Immutable id
        /// of Chrome OS Device</param>
        public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice body, string customerId, string deviceId)
        {
            return new UpdateRequest(service, body, customerId, deviceId);
        }

        /// <summary>Update Chrome OS Device</summary>
        public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice body, string customerId, string deviceId)
                : base(service)
            {
                CustomerId = customerId;
                DeviceId = deviceId;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Immutable id of Chrome OS Device</summary>
            [Google.Apis.Util.RequestParameterAttribute("deviceId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DeviceId { get; private set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and
                /// user)</summary>
                [Google.Apis.Util.StringValueAttribute("BASIC")]
                BASIC,
                /// <summary>Includes all metadata fields</summary>
                [Google.Apis.Util.StringValueAttribute("FULL")]
                FULL,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/devices/chromeos/{deviceId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "deviceId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "deviceId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "customers" collection of methods.</summary>
    public class CustomersResource
    {
        private const string Resource = "customers";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public CustomersResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Retrieves a customer.</summary>
        /// <param name="customerKey">Id of the customer to be retrieved</param>
        public virtual GetRequest Get(string customerKey)
        {
            return new GetRequest(service, customerKey);
        }

        /// <summary>Retrieves a customer.</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Customer>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string customerKey)
                : base(service)
            {
                CustomerKey = customerKey;
                InitParameters();
            }


            /// <summary>Id of the customer to be retrieved</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customers/{customerKey}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a customer. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerKey">Id of the customer to be updated</param>
        public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.Customer body, string customerKey)
        {
            return new PatchRequest(service, body, customerKey);
        }

        /// <summary>Updates a customer. This method supports patch semantics.</summary>
        public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Customer>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Customer body, string customerKey)
                : base(service)
            {
                CustomerKey = customerKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Id of the customer to be updated</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Customer Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customers/{customerKey}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a customer.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerKey">Id of the customer to be updated</param>
        public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.Customer body, string customerKey)
        {
            return new UpdateRequest(service, body, customerKey);
        }

        /// <summary>Updates a customer.</summary>
        public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Customer>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Customer body, string customerKey)
                : base(service)
            {
                CustomerKey = customerKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Id of the customer to be updated</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Customer Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customers/{customerKey}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "domainAliases" collection of methods.</summary>
    public class DomainAliasesResource
    {
        private const string Resource = "domainAliases";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public DomainAliasesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a Domain Alias of the customer.</summary>
        /// <param name="customer">Immutable id of the Google Apps account.</param>
        /// <param name="domainAliasName">Name
        /// of domain alias to be retrieved.</param>
        public virtual DeleteRequest Delete(string customer, string domainAliasName)
        {
            return new DeleteRequest(service, customer, domainAliasName);
        }

        /// <summary>Deletes a Domain Alias of the customer.</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string customer, string domainAliasName)
                : base(service)
            {
                Customer = customer;
                DomainAliasName = domainAliasName;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Name of domain alias to be retrieved.</summary>
            [Google.Apis.Util.RequestParameterAttribute("domainAliasName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DomainAliasName { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/domainaliases/{domainAliasName}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "domainAliasName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "domainAliasName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a domain alias of the customer.</summary>
        /// <param name="customer">Immutable id of the Google Apps account.</param>
        /// <param name="domainAliasName">Name
        /// of domain alias to be retrieved.</param>
        public virtual GetRequest Get(string customer, string domainAliasName)
        {
            return new GetRequest(service, customer, domainAliasName);
        }

        /// <summary>Retrieves a domain alias of the customer.</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.DomainAlias>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string customer, string domainAliasName)
                : base(service)
            {
                Customer = customer;
                DomainAliasName = domainAliasName;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Name of domain alias to be retrieved.</summary>
            [Google.Apis.Util.RequestParameterAttribute("domainAliasName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DomainAliasName { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/domainaliases/{domainAliasName}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "domainAliasName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "domainAliasName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Inserts a Domain alias of the customer.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customer">Immutable id of the Google Apps account.</param>
        public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.DomainAlias body, string customer)
        {
            return new InsertRequest(service, body, customer);
        }

        /// <summary>Inserts a Domain alias of the customer.</summary>
        public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.DomainAlias>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.DomainAlias body, string customer)
                : base(service)
            {
                Customer = customer;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.DomainAlias Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/domainaliases"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists the domain aliases of the customer.</summary>
        /// <param name="customer">Immutable id of the Google Apps account.</param>
        public virtual ListRequest List(string customer)
        {
            return new ListRequest(service, customer);
        }

        /// <summary>Lists the domain aliases of the customer.</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.DomainAliases>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string customer)
                : base(service)
            {
                Customer = customer;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Name of the parent domain for which domain aliases are to be fetched.</summary>
            [Google.Apis.Util.RequestParameterAttribute("parentDomainName", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string ParentDomainName { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/domainaliases"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "parentDomainName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "parentDomainName",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "domains" collection of methods.</summary>
    public class DomainsResource
    {
        private const string Resource = "domains";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public DomainsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a domain of the customer.</summary>
        /// <param name="customer">Immutable id of the Google Apps account.</param>
        /// <param name="domainName">Name of
        /// domain to be deleted</param>
        public virtual DeleteRequest Delete(string customer, string domainName)
        {
            return new DeleteRequest(service, customer, domainName);
        }

        /// <summary>Deletes a domain of the customer.</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string customer, string domainName)
                : base(service)
            {
                Customer = customer;
                DomainName = domainName;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Name of domain to be deleted</summary>
            [Google.Apis.Util.RequestParameterAttribute("domainName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DomainName { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/domains/{domainName}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "domainName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "domainName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a domain of the customer.</summary>
        /// <param name="customer">Immutable id of the Google Apps account.</param>
        /// <param name="domainName">Name of
        /// domain to be retrieved</param>
        public virtual GetRequest Get(string customer, string domainName)
        {
            return new GetRequest(service, customer, domainName);
        }

        /// <summary>Retrieves a domain of the customer.</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Domains>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string customer, string domainName)
                : base(service)
            {
                Customer = customer;
                DomainName = domainName;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Name of domain to be retrieved</summary>
            [Google.Apis.Util.RequestParameterAttribute("domainName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string DomainName { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/domains/{domainName}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "domainName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "domainName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Inserts a domain of the customer.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customer">Immutable id of the Google Apps account.</param>
        public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.Domains body, string customer)
        {
            return new InsertRequest(service, body, customer);
        }

        /// <summary>Inserts a domain of the customer.</summary>
        public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Domains>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Domains body, string customer)
                : base(service)
            {
                Customer = customer;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Domains Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/domains"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists the domains of the customer.</summary>
        /// <param name="customer">Immutable id of the Google Apps account.</param>
        public virtual ListRequest List(string customer)
        {
            return new ListRequest(service, customer);
        }

        /// <summary>Lists the domains of the customer.</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Domains2>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string customer)
                : base(service)
            {
                Customer = customer;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/domains"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "groups" collection of methods.</summary>
    public class GroupsResource
    {
        private const string Resource = "groups";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public GroupsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            aliases = new AliasesResource(service);

        }

        private readonly AliasesResource aliases;

        /// <summary>Gets the Aliases resource.</summary>
        public virtual AliasesResource Aliases
        {
            get { return aliases; }
        }

        /// <summary>The "aliases" collection of methods.</summary>
        public class AliasesResource
        {
            private const string Resource = "aliases";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public AliasesResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>Remove a alias for the group</summary>
            /// <param name="groupKey">Email or immutable Id of the group</param>
            /// <param name="alias">The alias to be
            /// removed</param>
            public virtual DeleteRequest Delete(string groupKey, string alias)
            {
                return new DeleteRequest(service, groupKey, alias);
            }

            /// <summary>Remove a alias for the group</summary>
            public class DeleteRequest : DirectoryBaseServiceRequest<string>
            {
                /// <summary>Constructs a new Delete request.</summary>
                public DeleteRequest(Google.Apis.Services.IClientService service, string groupKey, string alias)
                    : base(service)
                {
                    GroupKey = groupKey;
                    Alias = alias;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the group</summary>
                [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string GroupKey { get; private set; }

                /// <summary>The alias to be removed</summary>
                [Google.Apis.Util.RequestParameterAttribute("alias", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Alias { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "delete"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "DELETE"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "groups/{groupKey}/aliases/{alias}"; }
                }

                /// <summary>Initializes Delete parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "groupKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "groupKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "alias", new Google.Apis.Discovery.Parameter
                        {
                            Name = "alias",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Add a alias for the group</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="groupKey">Email or immutable Id of the group</param>
            public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.Alias body, string groupKey)
            {
                return new InsertRequest(service, body, groupKey);
            }

            /// <summary>Add a alias for the group</summary>
            public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Alias>
            {
                /// <summary>Constructs a new Insert request.</summary>
                public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Alias body, string groupKey)
                    : base(service)
                {
                    GroupKey = groupKey;
                    Body = body;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the group</summary>
                [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string GroupKey { get; private set; }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.Admin.Directory.directory_v1.Data.Alias Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "insert"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "POST"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "groups/{groupKey}/aliases"; }
                }

                /// <summary>Initializes Insert parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "groupKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "groupKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>List all aliases for a group</summary>
            /// <param name="groupKey">Email or immutable Id of the group</param>
            public virtual ListRequest List(string groupKey)
            {
                return new ListRequest(service, groupKey);
            }

            /// <summary>List all aliases for a group</summary>
            public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Aliases>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string groupKey)
                    : base(service)
                {
                    GroupKey = groupKey;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the group</summary>
                [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string GroupKey { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "groups/{groupKey}/aliases"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "groupKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "groupKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }

        /// <summary>Delete Group</summary>
        /// <param name="groupKey">Email or immutable Id of the group</param>
        public virtual DeleteRequest Delete(string groupKey)
        {
            return new DeleteRequest(service, groupKey);
        }

        /// <summary>Delete Group</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string groupKey)
                : base(service)
            {
                GroupKey = groupKey;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the group</summary>
            [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string GroupKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups/{groupKey}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "groupKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "groupKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve Group</summary>
        /// <param name="groupKey">Email or immutable Id of the group</param>
        public virtual GetRequest Get(string groupKey)
        {
            return new GetRequest(service, groupKey);
        }

        /// <summary>Retrieve Group</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Group>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string groupKey)
                : base(service)
            {
                GroupKey = groupKey;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the group</summary>
            [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string GroupKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups/{groupKey}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "groupKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "groupKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Create Group</summary>
        /// <param name="body">The body of the request.</param>
        public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.Group body)
        {
            return new InsertRequest(service, body);
        }

        /// <summary>Create Group</summary>
        public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Group>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Group body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Group Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Retrieve all groups in a domain (paginated)</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>Retrieve all groups in a domain (paginated)</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Groups>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account. In case of multi-domain, to fetch all groups for a
            /// customer, fill this field instead of domain.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Customer { get; set; }

            /// <summary>Name of the domain. Fill this field to get groups from only this domain. To return all groups
            /// in a multi-domain fill customer field instead.</summary>
            [Google.Apis.Util.RequestParameterAttribute("domain", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Domain { get; set; }

            /// <summary>Maximum number of results to return. Default is 200</summary>
            /// [minimum: 1]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Token to specify next page in the list</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Email or immutable Id of the user if only those groups are to be listed, the given user is a
            /// member of. If Id, it should match with id of user object</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserKey { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "domain", new Google.Apis.Discovery.Parameter
                    {
                        Name = "domain",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update Group. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="groupKey">Email or immutable Id of the group. If Id, it should match with id of group
        /// object</param>
        public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.Group body, string groupKey)
        {
            return new PatchRequest(service, body, groupKey);
        }

        /// <summary>Update Group. This method supports patch semantics.</summary>
        public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Group>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Group body, string groupKey)
                : base(service)
            {
                GroupKey = groupKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the group. If Id, it should match with id of group object</summary>
            [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string GroupKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Group Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups/{groupKey}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "groupKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "groupKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update Group</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="groupKey">Email or immutable Id of the group. If Id, it should match with id of group
        /// object</param>
        public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.Group body, string groupKey)
        {
            return new UpdateRequest(service, body, groupKey);
        }

        /// <summary>Update Group</summary>
        public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Group>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Group body, string groupKey)
                : base(service)
            {
                GroupKey = groupKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the group. If Id, it should match with id of group object</summary>
            [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string GroupKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Group Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups/{groupKey}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "groupKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "groupKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "members" collection of methods.</summary>
    public class MembersResource
    {
        private const string Resource = "members";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public MembersResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Remove membership.</summary>
        /// <param name="groupKey">Email or immutable Id of the group</param>
        /// <param name="memberKey">Email or immutable
        /// Id of the member</param>
        public virtual DeleteRequest Delete(string groupKey, string memberKey)
        {
            return new DeleteRequest(service, groupKey, memberKey);
        }

        /// <summary>Remove membership.</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string groupKey, string memberKey)
                : base(service)
            {
                GroupKey = groupKey;
                MemberKey = memberKey;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the group</summary>
            [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string GroupKey { get; private set; }

            /// <summary>Email or immutable Id of the member</summary>
            [Google.Apis.Util.RequestParameterAttribute("memberKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string MemberKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups/{groupKey}/members/{memberKey}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "groupKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "groupKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "memberKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "memberKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve Group Member</summary>
        /// <param name="groupKey">Email or immutable Id of the group</param>
        /// <param name="memberKey">Email or immutable
        /// Id of the member</param>
        public virtual GetRequest Get(string groupKey, string memberKey)
        {
            return new GetRequest(service, groupKey, memberKey);
        }

        /// <summary>Retrieve Group Member</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Member>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string groupKey, string memberKey)
                : base(service)
            {
                GroupKey = groupKey;
                MemberKey = memberKey;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the group</summary>
            [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string GroupKey { get; private set; }

            /// <summary>Email or immutable Id of the member</summary>
            [Google.Apis.Util.RequestParameterAttribute("memberKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string MemberKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups/{groupKey}/members/{memberKey}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "groupKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "groupKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "memberKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "memberKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Add user to the specified group.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="groupKey">Email or immutable Id of the group</param>
        public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.Member body, string groupKey)
        {
            return new InsertRequest(service, body, groupKey);
        }

        /// <summary>Add user to the specified group.</summary>
        public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Member>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Member body, string groupKey)
                : base(service)
            {
                GroupKey = groupKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the group</summary>
            [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string GroupKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Member Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups/{groupKey}/members"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "groupKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "groupKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve all members in a group (paginated)</summary>
        /// <param name="groupKey">Email or immutable Id of the group</param>
        public virtual ListRequest List(string groupKey)
        {
            return new ListRequest(service, groupKey);
        }

        /// <summary>Retrieve all members in a group (paginated)</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Members>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string groupKey)
                : base(service)
            {
                GroupKey = groupKey;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the group</summary>
            [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string GroupKey { get; private set; }

            /// <summary>Maximum number of results to return. Default is 200</summary>
            /// [minimum: 1]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Token to specify next page in the list</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Comma separated role values to filter list results on.</summary>
            [Google.Apis.Util.RequestParameterAttribute("roles", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Roles { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups/{groupKey}/members"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "groupKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "groupKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "roles", new Google.Apis.Discovery.Parameter
                    {
                        Name = "roles",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update membership of a user in the specified group. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="groupKey">Email or immutable Id of the group. If Id, it should match with id of group
        /// object</param>
        /// <param name="memberKey">Email or immutable Id of the user. If Id, it should match with id of
        /// member object</param>
        public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.Member body, string groupKey, string memberKey)
        {
            return new PatchRequest(service, body, groupKey, memberKey);
        }

        /// <summary>Update membership of a user in the specified group. This method supports patch semantics.</summary>
        public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Member>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Member body, string groupKey, string memberKey)
                : base(service)
            {
                GroupKey = groupKey;
                MemberKey = memberKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the group. If Id, it should match with id of group object</summary>
            [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string GroupKey { get; private set; }

            /// <summary>Email or immutable Id of the user. If Id, it should match with id of member object</summary>
            [Google.Apis.Util.RequestParameterAttribute("memberKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string MemberKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Member Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups/{groupKey}/members/{memberKey}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "groupKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "groupKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "memberKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "memberKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update membership of a user in the specified group.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="groupKey">Email or immutable Id of the group. If Id, it should match with id of group
        /// object</param>
        /// <param name="memberKey">Email or immutable Id of the user. If Id, it should match with id of
        /// member object</param>
        public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.Member body, string groupKey, string memberKey)
        {
            return new UpdateRequest(service, body, groupKey, memberKey);
        }

        /// <summary>Update membership of a user in the specified group.</summary>
        public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Member>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Member body, string groupKey, string memberKey)
                : base(service)
            {
                GroupKey = groupKey;
                MemberKey = memberKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the group. If Id, it should match with id of group object</summary>
            [Google.Apis.Util.RequestParameterAttribute("groupKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string GroupKey { get; private set; }

            /// <summary>Email or immutable Id of the user. If Id, it should match with id of member object</summary>
            [Google.Apis.Util.RequestParameterAttribute("memberKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string MemberKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Member Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "groups/{groupKey}/members/{memberKey}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "groupKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "groupKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "memberKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "memberKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "mobiledevices" collection of methods.</summary>
    public class MobiledevicesResource
    {
        private const string Resource = "mobiledevices";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public MobiledevicesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Take action on Mobile Device</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="resourceId">Immutable
        /// id of Mobile Device</param>
        public virtual ActionRequest Action(Google.Apis.Admin.Directory.directory_v1.Data.MobileDeviceAction body, string customerId, string resourceId)
        {
            return new ActionRequest(service, body, customerId, resourceId);
        }

        /// <summary>Take action on Mobile Device</summary>
        public class ActionRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Action request.</summary>
            public ActionRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.MobileDeviceAction body, string customerId, string resourceId)
                : base(service)
            {
                CustomerId = customerId;
                ResourceId = resourceId;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Immutable id of Mobile Device</summary>
            [Google.Apis.Util.RequestParameterAttribute("resourceId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ResourceId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.MobileDeviceAction Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "action"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/devices/mobile/{resourceId}/action"; }
            }

            /// <summary>Initializes Action parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "resourceId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "resourceId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Delete Mobile Device</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="resourceId">Immutable
        /// id of Mobile Device</param>
        public virtual DeleteRequest Delete(string customerId, string resourceId)
        {
            return new DeleteRequest(service, customerId, resourceId);
        }

        /// <summary>Delete Mobile Device</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string customerId, string resourceId)
                : base(service)
            {
                CustomerId = customerId;
                ResourceId = resourceId;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Immutable id of Mobile Device</summary>
            [Google.Apis.Util.RequestParameterAttribute("resourceId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ResourceId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/devices/mobile/{resourceId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "resourceId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "resourceId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve Mobile Device</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="resourceId">Immutable
        /// id of Mobile Device</param>
        public virtual GetRequest Get(string customerId, string resourceId)
        {
            return new GetRequest(service, customerId, resourceId);
        }

        /// <summary>Retrieve Mobile Device</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.MobileDevice>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string customerId, string resourceId)
                : base(service)
            {
                CustomerId = customerId;
                ResourceId = resourceId;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Immutable id of Mobile Device</summary>
            [Google.Apis.Util.RequestParameterAttribute("resourceId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ResourceId { get; private set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Includes only the basic metadata fields (e.g., deviceId, model, status, type, and
                /// status)</summary>
                [Google.Apis.Util.StringValueAttribute("BASIC")]
                BASIC,
                /// <summary>Includes all metadata fields</summary>
                [Google.Apis.Util.StringValueAttribute("FULL")]
                FULL,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/devices/mobile/{resourceId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "resourceId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "resourceId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve all Mobile Devices of a customer (paginated)</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        public virtual ListRequest List(string customerId)
        {
            return new ListRequest(service, customerId);
        }

        /// <summary>Retrieve all Mobile Devices of a customer (paginated)</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.MobileDevices>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string customerId)
                : base(service)
            {
                CustomerId = customerId;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Maximum number of results to return. Default is 100</summary>
            /// [minimum: 1]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Column to use for sorting results</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderBy", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<OrderByEnum> OrderBy { get; set; }

            /// <summary>Column to use for sorting results</summary>
            public enum OrderByEnum
            {
                /// <summary>Mobile Device serial number.</summary>
                [Google.Apis.Util.StringValueAttribute("deviceId")]
                DeviceId,
                /// <summary>Owner user email.</summary>
                [Google.Apis.Util.StringValueAttribute("email")]
                Email,
                /// <summary>Last policy settings sync date time of the device.</summary>
                [Google.Apis.Util.StringValueAttribute("lastSync")]
                LastSync,
                /// <summary>Mobile Device model.</summary>
                [Google.Apis.Util.StringValueAttribute("model")]
                Model,
                /// <summary>Owner user name.</summary>
                [Google.Apis.Util.StringValueAttribute("name")]
                Name,
                /// <summary>Mobile operating system.</summary>
                [Google.Apis.Util.StringValueAttribute("os")]
                Os,
                /// <summary>Status of the device.</summary>
                [Google.Apis.Util.StringValueAttribute("status")]
                Status,
                /// <summary>Type of the device.</summary>
                [Google.Apis.Util.StringValueAttribute("type")]
                Type,
            }

            /// <summary>Token to specify next page in the list</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Restrict information returned to a set of selected fields.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Includes only the basic metadata fields (e.g., deviceId, model, status, type, and
                /// status)</summary>
                [Google.Apis.Util.StringValueAttribute("BASIC")]
                BASIC,
                /// <summary>Includes all metadata fields</summary>
                [Google.Apis.Util.StringValueAttribute("FULL")]
                FULL,
            }

            /// <summary>Search string in the format given at
            /// http://support.google.com/a/bin/answer.py?hl=en=1408863#search</summary>
            [Google.Apis.Util.RequestParameterAttribute("query", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Query { get; set; }

            /// <summary>Whether to return results in ascending or descending order. Only of use when orderBy is also
            /// used</summary>
            [Google.Apis.Util.RequestParameterAttribute("sortOrder", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<SortOrderEnum> SortOrder { get; set; }

            /// <summary>Whether to return results in ascending or descending order. Only of use when orderBy is also
            /// used</summary>
            public enum SortOrderEnum
            {
                /// <summary>Ascending order.</summary>
                [Google.Apis.Util.StringValueAttribute("ASCENDING")]
                ASCENDING,
                /// <summary>Descending order.</summary>
                [Google.Apis.Util.StringValueAttribute("DESCENDING")]
                DESCENDING,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/devices/mobile"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderBy", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderBy",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "query", new Google.Apis.Discovery.Parameter
                    {
                        Name = "query",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "sortOrder", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sortOrder",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "notifications" collection of methods.</summary>
    public class NotificationsResource
    {
        private const string Resource = "notifications";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public NotificationsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a notification</summary>
        /// <param name="customer">The unique ID for the customer's Google account. The customerId is also returned as part of
        /// the Users resource.</param>
        /// <param name="notificationId">The unique ID of the notification.</param>
        public virtual DeleteRequest Delete(string customer, string notificationId)
        {
            return new DeleteRequest(service, customer, notificationId);
        }

        /// <summary>Deletes a notification</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string customer, string notificationId)
                : base(service)
            {
                Customer = customer;
                NotificationId = notificationId;
                InitParameters();
            }


            /// <summary>The unique ID for the customer's Google account. The customerId is also returned as part of the
            /// Users resource.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>The unique ID of the notification.</summary>
            [Google.Apis.Util.RequestParameterAttribute("notificationId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string NotificationId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/notifications/{notificationId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "notificationId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "notificationId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a notification.</summary>
        /// <param name="customer">The unique ID for the customer's Google account. The customerId is also returned as part of
        /// the Users resource.</param>
        /// <param name="notificationId">The unique ID of the notification.</param>
        public virtual GetRequest Get(string customer, string notificationId)
        {
            return new GetRequest(service, customer, notificationId);
        }

        /// <summary>Retrieves a notification.</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Notification>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string customer, string notificationId)
                : base(service)
            {
                Customer = customer;
                NotificationId = notificationId;
                InitParameters();
            }


            /// <summary>The unique ID for the customer's Google account. The customerId is also returned as part of the
            /// Users resource.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>The unique ID of the notification.</summary>
            [Google.Apis.Util.RequestParameterAttribute("notificationId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string NotificationId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/notifications/{notificationId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "notificationId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "notificationId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a list of notifications.</summary>
        /// <param name="customer">The unique ID for the customer's Google account.</param>
        public virtual ListRequest List(string customer)
        {
            return new ListRequest(service, customer);
        }

        /// <summary>Retrieves a list of notifications.</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Notifications>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string customer)
                : base(service)
            {
                Customer = customer;
                InitParameters();
            }


            /// <summary>The unique ID for the customer's Google account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>The ISO 639-1 code of the language notifications are returned in. The default is English
            /// (en).</summary>
            [Google.Apis.Util.RequestParameterAttribute("language", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Language { get; set; }

            /// <summary>Maximum number of notifications to return per page. The default is 100.</summary>
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>The token to specify the page of results to retrieve.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/notifications"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "language", new Google.Apis.Discovery.Parameter
                    {
                        Name = "language",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a notification. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customer">The unique ID for the customer's Google account.</param>
        /// <param
        /// name="notificationId">The unique ID of the notification.</param>
        public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.Notification body, string customer, string notificationId)
        {
            return new PatchRequest(service, body, customer, notificationId);
        }

        /// <summary>Updates a notification. This method supports patch semantics.</summary>
        public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Notification>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Notification body, string customer, string notificationId)
                : base(service)
            {
                Customer = customer;
                NotificationId = notificationId;
                Body = body;
                InitParameters();
            }


            /// <summary>The unique ID for the customer's Google account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>The unique ID of the notification.</summary>
            [Google.Apis.Util.RequestParameterAttribute("notificationId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string NotificationId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Notification Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/notifications/{notificationId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "notificationId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "notificationId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a notification.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customer">The unique ID for the customer's Google account.</param>
        /// <param
        /// name="notificationId">The unique ID of the notification.</param>
        public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.Notification body, string customer, string notificationId)
        {
            return new UpdateRequest(service, body, customer, notificationId);
        }

        /// <summary>Updates a notification.</summary>
        public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Notification>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Notification body, string customer, string notificationId)
                : base(service)
            {
                Customer = customer;
                NotificationId = notificationId;
                Body = body;
                InitParameters();
            }


            /// <summary>The unique ID for the customer's Google account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>The unique ID of the notification.</summary>
            [Google.Apis.Util.RequestParameterAttribute("notificationId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string NotificationId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Notification Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/notifications/{notificationId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "notificationId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "notificationId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "orgunits" collection of methods.</summary>
    public class OrgunitsResource
    {
        private const string Resource = "orgunits";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public OrgunitsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Remove Organization Unit</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="orgUnitPath">Full path
        /// of the organization unit or its Id</param>
        public virtual DeleteRequest Delete(string customerId, Google.Apis.Util.Repeatable<string> orgUnitPath)
        {
            return new DeleteRequest(service, customerId, orgUnitPath);
        }

        /// <summary>Remove Organization Unit</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string customerId, Google.Apis.Util.Repeatable<string> orgUnitPath)
                : base(service)
            {
                CustomerId = customerId;
                OrgUnitPath = orgUnitPath;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Full path of the organization unit or its Id</summary>
            [Google.Apis.Util.RequestParameterAttribute("orgUnitPath", Google.Apis.Util.RequestParameterType.Path)]
            public virtual Google.Apis.Util.Repeatable<string> OrgUnitPath { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/orgunits{/orgUnitPath*}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orgUnitPath", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orgUnitPath",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve Organization Unit</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="orgUnitPath">Full path
        /// of the organization unit or its Id</param>
        public virtual GetRequest Get(string customerId, Google.Apis.Util.Repeatable<string> orgUnitPath)
        {
            return new GetRequest(service, customerId, orgUnitPath);
        }

        /// <summary>Retrieve Organization Unit</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string customerId, Google.Apis.Util.Repeatable<string> orgUnitPath)
                : base(service)
            {
                CustomerId = customerId;
                OrgUnitPath = orgUnitPath;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Full path of the organization unit or its Id</summary>
            [Google.Apis.Util.RequestParameterAttribute("orgUnitPath", Google.Apis.Util.RequestParameterType.Path)]
            public virtual Google.Apis.Util.Repeatable<string> OrgUnitPath { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/orgunits{/orgUnitPath*}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orgUnitPath", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orgUnitPath",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Add Organization Unit</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit body, string customerId)
        {
            return new InsertRequest(service, body, customerId);
        }

        /// <summary>Add Organization Unit</summary>
        public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit body, string customerId)
                : base(service)
            {
                CustomerId = customerId;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/orgunits"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve all Organization Units</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        public virtual ListRequest List(string customerId)
        {
            return new ListRequest(service, customerId);
        }

        /// <summary>Retrieve all Organization Units</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.OrgUnits>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string customerId)
                : base(service)
            {
                CustomerId = customerId;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>the URL-encoded organization unit's path or its Id</summary>
            [Google.Apis.Util.RequestParameterAttribute("orgUnitPath", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OrgUnitPath { get; set; }

            /// <summary>Whether to return all sub-organizations or just immediate children</summary>
            [Google.Apis.Util.RequestParameterAttribute("type", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<TypeEnum> Type { get; set; }

            /// <summary>Whether to return all sub-organizations or just immediate children</summary>
            public enum TypeEnum
            {
                /// <summary>All sub-organization units.</summary>
                [Google.Apis.Util.StringValueAttribute("all")]
                All,
                /// <summary>Immediate children only (default).</summary>
                [Google.Apis.Util.StringValueAttribute("children")]
                Children,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/orgunits"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orgUnitPath", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orgUnitPath",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "type", new Google.Apis.Discovery.Parameter
                    {
                        Name = "type",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update Organization Unit. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="orgUnitPath">Full path
        /// of the organization unit or its Id</param>
        public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit body, string customerId, Google.Apis.Util.Repeatable<string> orgUnitPath)
        {
            return new PatchRequest(service, body, customerId, orgUnitPath);
        }

        /// <summary>Update Organization Unit. This method supports patch semantics.</summary>
        public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit body, string customerId, Google.Apis.Util.Repeatable<string> orgUnitPath)
                : base(service)
            {
                CustomerId = customerId;
                OrgUnitPath = orgUnitPath;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Full path of the organization unit or its Id</summary>
            [Google.Apis.Util.RequestParameterAttribute("orgUnitPath", Google.Apis.Util.RequestParameterType.Path)]
            public virtual Google.Apis.Util.Repeatable<string> OrgUnitPath { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/orgunits{/orgUnitPath*}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orgUnitPath", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orgUnitPath",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update Organization Unit</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="orgUnitPath">Full path
        /// of the organization unit or its Id</param>
        public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit body, string customerId, Google.Apis.Util.Repeatable<string> orgUnitPath)
        {
            return new UpdateRequest(service, body, customerId, orgUnitPath);
        }

        /// <summary>Update Organization Unit</summary>
        public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit body, string customerId, Google.Apis.Util.Repeatable<string> orgUnitPath)
                : base(service)
            {
                CustomerId = customerId;
                OrgUnitPath = orgUnitPath;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Full path of the organization unit or its Id</summary>
            [Google.Apis.Util.RequestParameterAttribute("orgUnitPath", Google.Apis.Util.RequestParameterType.Path)]
            public virtual Google.Apis.Util.Repeatable<string> OrgUnitPath { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.OrgUnit Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/orgunits{/orgUnitPath*}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orgUnitPath", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orgUnitPath",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "privileges" collection of methods.</summary>
    public class PrivilegesResource
    {
        private const string Resource = "privileges";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public PrivilegesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Retrieves a paginated list of all privileges for a customer.</summary>
        /// <param name="customer">Immutable ID of the Google Apps account.</param>
        public virtual ListRequest List(string customer)
        {
            return new ListRequest(service, customer);
        }

        /// <summary>Retrieves a paginated list of all privileges for a customer.</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Privileges>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string customer)
                : base(service)
            {
                Customer = customer;
                InitParameters();
            }


            /// <summary>Immutable ID of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roles/ALL/privileges"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "resources" collection of methods.</summary>
    public class ResourcesResource
    {
        private const string Resource = "resources";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ResourcesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            calendars = new CalendarsResource(service);

        }

        private readonly CalendarsResource calendars;

        /// <summary>Gets the Calendars resource.</summary>
        public virtual CalendarsResource Calendars
        {
            get { return calendars; }
        }

        /// <summary>The "calendars" collection of methods.</summary>
        public class CalendarsResource
        {
            private const string Resource = "calendars";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public CalendarsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>Deletes a calendar resource.</summary>
            /// <param name="customer">The unique ID for the customer's Google account. As an account administrator, you can also
            /// use the my_customer alias to represent your account's customer ID.</param>
            /// <param
            /// name="calendarResourceId">The unique ID of the calendar resource to delete.</param>
            public virtual DeleteRequest Delete(string customer, string calendarResourceId)
            {
                return new DeleteRequest(service, customer, calendarResourceId);
            }

            /// <summary>Deletes a calendar resource.</summary>
            public class DeleteRequest : DirectoryBaseServiceRequest<string>
            {
                /// <summary>Constructs a new Delete request.</summary>
                public DeleteRequest(Google.Apis.Services.IClientService service, string customer, string calendarResourceId)
                    : base(service)
                {
                    Customer = customer;
                    CalendarResourceId = calendarResourceId;
                    InitParameters();
                }


                /// <summary>The unique ID for the customer's Google account. As an account administrator, you can also
                /// use the my_customer alias to represent your account's customer ID.</summary>
                [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Customer { get; private set; }

                /// <summary>The unique ID of the calendar resource to delete.</summary>
                [Google.Apis.Util.RequestParameterAttribute("calendarResourceId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string CalendarResourceId { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "delete"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "DELETE"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "customer/{customer}/resources/calendars/{calendarResourceId}"; }
                }

                /// <summary>Initializes Delete parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "customer", new Google.Apis.Discovery.Parameter
                        {
                            Name = "customer",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "calendarResourceId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "calendarResourceId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Retrieves a calendar resource.</summary>
            /// <param name="customer">The unique ID for the customer's Google account. As an account administrator, you can also
            /// use the my_customer alias to represent your account's customer ID.</param>
            /// <param
            /// name="calendarResourceId">The unique ID of the calendar resource to retrieve.</param>
            public virtual GetRequest Get(string customer, string calendarResourceId)
            {
                return new GetRequest(service, customer, calendarResourceId);
            }

            /// <summary>Retrieves a calendar resource.</summary>
            public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource>
            {
                /// <summary>Constructs a new Get request.</summary>
                public GetRequest(Google.Apis.Services.IClientService service, string customer, string calendarResourceId)
                    : base(service)
                {
                    Customer = customer;
                    CalendarResourceId = calendarResourceId;
                    InitParameters();
                }


                /// <summary>The unique ID for the customer's Google account. As an account administrator, you can also
                /// use the my_customer alias to represent your account's customer ID.</summary>
                [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Customer { get; private set; }

                /// <summary>The unique ID of the calendar resource to retrieve.</summary>
                [Google.Apis.Util.RequestParameterAttribute("calendarResourceId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string CalendarResourceId { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "get"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "customer/{customer}/resources/calendars/{calendarResourceId}"; }
                }

                /// <summary>Initializes Get parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "customer", new Google.Apis.Discovery.Parameter
                        {
                            Name = "customer",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "calendarResourceId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "calendarResourceId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Inserts a calendar resource.</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="customer">The unique ID for the customer's Google account. As an account administrator, you can also
            /// use the my_customer alias to represent your account's customer ID.</param>
            public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource body, string customer)
            {
                return new InsertRequest(service, body, customer);
            }

            /// <summary>Inserts a calendar resource.</summary>
            public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource>
            {
                /// <summary>Constructs a new Insert request.</summary>
                public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource body, string customer)
                    : base(service)
                {
                    Customer = customer;
                    Body = body;
                    InitParameters();
                }


                /// <summary>The unique ID for the customer's Google account. As an account administrator, you can also
                /// use the my_customer alias to represent your account's customer ID.</summary>
                [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Customer { get; private set; }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "insert"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "POST"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "customer/{customer}/resources/calendars"; }
                }

                /// <summary>Initializes Insert parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "customer", new Google.Apis.Discovery.Parameter
                        {
                            Name = "customer",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Retrieves a list of calendar resources for an account.</summary>
            /// <param name="customer">The unique ID for the customer's Google account. As an account administrator, you can also
            /// use the my_customer alias to represent your account's customer ID.</param>
            public virtual ListRequest List(string customer)
            {
                return new ListRequest(service, customer);
            }

            /// <summary>Retrieves a list of calendar resources for an account.</summary>
            public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.CalendarResources>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string customer)
                    : base(service)
                {
                    Customer = customer;
                    InitParameters();
                }


                /// <summary>The unique ID for the customer's Google account. As an account administrator, you can also
                /// use the my_customer alias to represent your account's customer ID.</summary>
                [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Customer { get; private set; }

                /// <summary>Maximum number of results to return.</summary>
                /// [minimum: 1]
                /// [maximum: 500]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>Token to specify the next page in the list.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "customer/{customer}/resources/calendars"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "customer", new Google.Apis.Discovery.Parameter
                        {
                            Name = "customer",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Updates a calendar resource. This method supports patch semantics.</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="customer">The unique ID for the customer's Google account. As an account administrator, you can also
            /// use the my_customer alias to represent your account's customer ID.</param>
            /// <param
            /// name="calendarResourceId">The unique ID of the calendar resource to update.</param>
            public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource body, string customer, string calendarResourceId)
            {
                return new PatchRequest(service, body, customer, calendarResourceId);
            }

            /// <summary>Updates a calendar resource. This method supports patch semantics.</summary>
            public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource>
            {
                /// <summary>Constructs a new Patch request.</summary>
                public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource body, string customer, string calendarResourceId)
                    : base(service)
                {
                    Customer = customer;
                    CalendarResourceId = calendarResourceId;
                    Body = body;
                    InitParameters();
                }


                /// <summary>The unique ID for the customer's Google account. As an account administrator, you can also
                /// use the my_customer alias to represent your account's customer ID.</summary>
                [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Customer { get; private set; }

                /// <summary>The unique ID of the calendar resource to update.</summary>
                [Google.Apis.Util.RequestParameterAttribute("calendarResourceId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string CalendarResourceId { get; private set; }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "patch"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "PATCH"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "customer/{customer}/resources/calendars/{calendarResourceId}"; }
                }

                /// <summary>Initializes Patch parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "customer", new Google.Apis.Discovery.Parameter
                        {
                            Name = "customer",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "calendarResourceId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "calendarResourceId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Updates a calendar resource.</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="customer">The unique ID for the customer's Google account. As an account administrator, you can also
            /// use the my_customer alias to represent your account's customer ID.</param>
            /// <param
            /// name="calendarResourceId">The unique ID of the calendar resource to update.</param>
            public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource body, string customer, string calendarResourceId)
            {
                return new UpdateRequest(service, body, customer, calendarResourceId);
            }

            /// <summary>Updates a calendar resource.</summary>
            public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource>
            {
                /// <summary>Constructs a new Update request.</summary>
                public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource body, string customer, string calendarResourceId)
                    : base(service)
                {
                    Customer = customer;
                    CalendarResourceId = calendarResourceId;
                    Body = body;
                    InitParameters();
                }


                /// <summary>The unique ID for the customer's Google account. As an account administrator, you can also
                /// use the my_customer alias to represent your account's customer ID.</summary>
                [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Customer { get; private set; }

                /// <summary>The unique ID of the calendar resource to update.</summary>
                [Google.Apis.Util.RequestParameterAttribute("calendarResourceId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string CalendarResourceId { get; private set; }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.Admin.Directory.directory_v1.Data.CalendarResource Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "update"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "PUT"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "customer/{customer}/resources/calendars/{calendarResourceId}"; }
                }

                /// <summary>Initializes Update parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "customer", new Google.Apis.Discovery.Parameter
                        {
                            Name = "customer",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "calendarResourceId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "calendarResourceId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }
    }

    /// <summary>The "roleAssignments" collection of methods.</summary>
    public class RoleAssignmentsResource
    {
        private const string Resource = "roleAssignments";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public RoleAssignmentsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a role assignment.</summary>
        /// <param name="customer">Immutable ID of the Google Apps account.</param>
        /// <param
        /// name="roleAssignmentId">Immutable ID of the role assignment.</param>
        public virtual DeleteRequest Delete(string customer, string roleAssignmentId)
        {
            return new DeleteRequest(service, customer, roleAssignmentId);
        }

        /// <summary>Deletes a role assignment.</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string customer, string roleAssignmentId)
                : base(service)
            {
                Customer = customer;
                RoleAssignmentId = roleAssignmentId;
                InitParameters();
            }


            /// <summary>Immutable ID of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Immutable ID of the role assignment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("roleAssignmentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RoleAssignmentId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roleassignments/{roleAssignmentId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "roleAssignmentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "roleAssignmentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve a role assignment.</summary>
        /// <param name="customer">Immutable ID of the Google Apps account.</param>
        /// <param
        /// name="roleAssignmentId">Immutable ID of the role assignment.</param>
        public virtual GetRequest Get(string customer, string roleAssignmentId)
        {
            return new GetRequest(service, customer, roleAssignmentId);
        }

        /// <summary>Retrieve a role assignment.</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.RoleAssignment>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string customer, string roleAssignmentId)
                : base(service)
            {
                Customer = customer;
                RoleAssignmentId = roleAssignmentId;
                InitParameters();
            }


            /// <summary>Immutable ID of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Immutable ID of the role assignment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("roleAssignmentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RoleAssignmentId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roleassignments/{roleAssignmentId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "roleAssignmentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "roleAssignmentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a role assignment.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customer">Immutable ID of the Google Apps account.</param>
        public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.RoleAssignment body, string customer)
        {
            return new InsertRequest(service, body, customer);
        }

        /// <summary>Creates a role assignment.</summary>
        public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.RoleAssignment>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.RoleAssignment body, string customer)
                : base(service)
            {
                Customer = customer;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable ID of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.RoleAssignment Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roleassignments"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a paginated list of all roleAssignments.</summary>
        /// <param name="customer">Immutable ID of the Google Apps account.</param>
        public virtual ListRequest List(string customer)
        {
            return new ListRequest(service, customer);
        }

        /// <summary>Retrieves a paginated list of all roleAssignments.</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.RoleAssignments>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string customer)
                : base(service)
            {
                Customer = customer;
                InitParameters();
            }


            /// <summary>Immutable ID of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Maximum number of results to return.</summary>
            /// [minimum: 1]
            /// [maximum: 200]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Token to specify the next page in the list.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Immutable ID of a role. If included in the request, returns only role assignments containing
            /// this role ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("roleId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string RoleId { get; set; }

            /// <summary>The user's primary email address, alias email address, or unique user ID. If included in the
            /// request, returns role assignments only for this user.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserKey { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roleassignments"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "roleId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "roleId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "roles" collection of methods.</summary>
    public class RolesResource
    {
        private const string Resource = "roles";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public RolesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a role.</summary>
        /// <param name="customer">Immutable ID of the Google Apps account.</param>
        /// <param name="roleId">Immutable ID of
        /// the role.</param>
        public virtual DeleteRequest Delete(string customer, string roleId)
        {
            return new DeleteRequest(service, customer, roleId);
        }

        /// <summary>Deletes a role.</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string customer, string roleId)
                : base(service)
            {
                Customer = customer;
                RoleId = roleId;
                InitParameters();
            }


            /// <summary>Immutable ID of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Immutable ID of the role.</summary>
            [Google.Apis.Util.RequestParameterAttribute("roleId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RoleId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roles/{roleId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "roleId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "roleId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a role.</summary>
        /// <param name="customer">Immutable ID of the Google Apps account.</param>
        /// <param name="roleId">Immutable ID of
        /// the role.</param>
        public virtual GetRequest Get(string customer, string roleId)
        {
            return new GetRequest(service, customer, roleId);
        }

        /// <summary>Retrieves a role.</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Role>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string customer, string roleId)
                : base(service)
            {
                Customer = customer;
                RoleId = roleId;
                InitParameters();
            }


            /// <summary>Immutable ID of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Immutable ID of the role.</summary>
            [Google.Apis.Util.RequestParameterAttribute("roleId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RoleId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roles/{roleId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "roleId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "roleId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a role.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customer">Immutable ID of the Google Apps account.</param>
        public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.Role body, string customer)
        {
            return new InsertRequest(service, body, customer);
        }

        /// <summary>Creates a role.</summary>
        public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Role>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Role body, string customer)
                : base(service)
            {
                Customer = customer;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable ID of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Role Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roles"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a paginated list of all the roles in a domain.</summary>
        /// <param name="customer">Immutable id of the Google Apps account.</param>
        public virtual ListRequest List(string customer)
        {
            return new ListRequest(service, customer);
        }

        /// <summary>Retrieves a paginated list of all the roles in a domain.</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Roles>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string customer)
                : base(service)
            {
                Customer = customer;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Maximum number of results to return.</summary>
            /// [minimum: 1]
            /// [maximum: 100]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Token to specify the next page in the list.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roles"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a role. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customer">Immutable ID of the Google Apps account.</param>
        /// <param name="roleId">Immutable ID of
        /// the role.</param>
        public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.Role body, string customer, string roleId)
        {
            return new PatchRequest(service, body, customer, roleId);
        }

        /// <summary>Updates a role. This method supports patch semantics.</summary>
        public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Role>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Role body, string customer, string roleId)
                : base(service)
            {
                Customer = customer;
                RoleId = roleId;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable ID of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Immutable ID of the role.</summary>
            [Google.Apis.Util.RequestParameterAttribute("roleId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RoleId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Role Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roles/{roleId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "roleId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "roleId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a role.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customer">Immutable ID of the Google Apps account.</param>
        /// <param name="roleId">Immutable ID of
        /// the role.</param>
        public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.Role body, string customer, string roleId)
        {
            return new UpdateRequest(service, body, customer, roleId);
        }

        /// <summary>Updates a role.</summary>
        public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Role>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Role body, string customer, string roleId)
                : base(service)
            {
                Customer = customer;
                RoleId = roleId;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable ID of the Google Apps account.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Customer { get; private set; }

            /// <summary>Immutable ID of the role.</summary>
            [Google.Apis.Util.RequestParameterAttribute("roleId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RoleId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Role Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customer}/roles/{roleId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "roleId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "roleId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "schemas" collection of methods.</summary>
    public class SchemasResource
    {
        private const string Resource = "schemas";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public SchemasResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Delete schema</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="schemaKey">Name or
        /// immutable Id of the schema</param>
        public virtual DeleteRequest Delete(string customerId, string schemaKey)
        {
            return new DeleteRequest(service, customerId, schemaKey);
        }

        /// <summary>Delete schema</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string customerId, string schemaKey)
                : base(service)
            {
                CustomerId = customerId;
                SchemaKey = schemaKey;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Name or immutable Id of the schema</summary>
            [Google.Apis.Util.RequestParameterAttribute("schemaKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string SchemaKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/schemas/{schemaKey}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "schemaKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "schemaKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve schema</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="schemaKey">Name or
        /// immutable Id of the schema</param>
        public virtual GetRequest Get(string customerId, string schemaKey)
        {
            return new GetRequest(service, customerId, schemaKey);
        }

        /// <summary>Retrieve schema</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Schema>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string customerId, string schemaKey)
                : base(service)
            {
                CustomerId = customerId;
                SchemaKey = schemaKey;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Name or immutable Id of the schema</summary>
            [Google.Apis.Util.RequestParameterAttribute("schemaKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string SchemaKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/schemas/{schemaKey}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "schemaKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "schemaKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Create schema.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.Schema body, string customerId)
        {
            return new InsertRequest(service, body, customerId);
        }

        /// <summary>Create schema.</summary>
        public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Schema>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Schema body, string customerId)
                : base(service)
            {
                CustomerId = customerId;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Schema Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/schemas"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieve all schemas for a customer</summary>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        public virtual ListRequest List(string customerId)
        {
            return new ListRequest(service, customerId);
        }

        /// <summary>Retrieve all schemas for a customer</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Schemas>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string customerId)
                : base(service)
            {
                CustomerId = customerId;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/schemas"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update schema. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="schemaKey">Name or
        /// immutable Id of the schema.</param>
        public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.Schema body, string customerId, string schemaKey)
        {
            return new PatchRequest(service, body, customerId, schemaKey);
        }

        /// <summary>Update schema. This method supports patch semantics.</summary>
        public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Schema>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Schema body, string customerId, string schemaKey)
                : base(service)
            {
                CustomerId = customerId;
                SchemaKey = schemaKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Name or immutable Id of the schema.</summary>
            [Google.Apis.Util.RequestParameterAttribute("schemaKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string SchemaKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Schema Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/schemas/{schemaKey}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "schemaKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "schemaKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update schema</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="customerId">Immutable id of the Google Apps account</param>
        /// <param name="schemaKey">Name or
        /// immutable Id of the schema.</param>
        public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.Schema body, string customerId, string schemaKey)
        {
            return new UpdateRequest(service, body, customerId, schemaKey);
        }

        /// <summary>Update schema</summary>
        public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Schema>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Schema body, string customerId, string schemaKey)
                : base(service)
            {
                CustomerId = customerId;
                SchemaKey = schemaKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Immutable id of the Google Apps account</summary>
            [Google.Apis.Util.RequestParameterAttribute("customerId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomerId { get; private set; }

            /// <summary>Name or immutable Id of the schema.</summary>
            [Google.Apis.Util.RequestParameterAttribute("schemaKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string SchemaKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Schema Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "customer/{customerId}/schemas/{schemaKey}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customerId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customerId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "schemaKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "schemaKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "tokens" collection of methods.</summary>
    public class TokensResource
    {
        private const string Resource = "tokens";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public TokensResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Delete all access tokens issued by a user for an application.</summary>
        /// <param name="userKey">Identifies the user in the API request. The value can be the user's primary email address,
        /// alias email address, or unique user ID.</param>
        /// <param name="clientId">The Client ID of the application the
        /// token is issued to.</param>
        public virtual DeleteRequest Delete(string userKey, string clientId)
        {
            return new DeleteRequest(service, userKey, clientId);
        }

        /// <summary>Delete all access tokens issued by a user for an application.</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string userKey, string clientId)
                : base(service)
            {
                UserKey = userKey;
                ClientId = clientId;
                InitParameters();
            }


            /// <summary>Identifies the user in the API request. The value can be the user's primary email address,
            /// alias email address, or unique user ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }

            /// <summary>The Client ID of the application the token is issued to.</summary>
            [Google.Apis.Util.RequestParameterAttribute("clientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ClientId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/tokens/{clientId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "clientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "clientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Get information about an access token issued by a user.</summary>
        /// <param name="userKey">Identifies the user in the API request. The value can be the user's primary email address,
        /// alias email address, or unique user ID.</param>
        /// <param name="clientId">The Client ID of the application the
        /// token is issued to.</param>
        public virtual GetRequest Get(string userKey, string clientId)
        {
            return new GetRequest(service, userKey, clientId);
        }

        /// <summary>Get information about an access token issued by a user.</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Token>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string userKey, string clientId)
                : base(service)
            {
                UserKey = userKey;
                ClientId = clientId;
                InitParameters();
            }


            /// <summary>Identifies the user in the API request. The value can be the user's primary email address,
            /// alias email address, or unique user ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }

            /// <summary>The Client ID of the application the token is issued to.</summary>
            [Google.Apis.Util.RequestParameterAttribute("clientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ClientId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/tokens/{clientId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "clientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "clientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Returns the set of tokens specified user has issued to 3rd party applications.</summary>
        /// <param name="userKey">Identifies the user in the API request. The value can be the user's primary email address,
        /// alias email address, or unique user ID.</param>
        public virtual ListRequest List(string userKey)
        {
            return new ListRequest(service, userKey);
        }

        /// <summary>Returns the set of tokens specified user has issued to 3rd party applications.</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Tokens>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string userKey)
                : base(service)
            {
                UserKey = userKey;
                InitParameters();
            }


            /// <summary>Identifies the user in the API request. The value can be the user's primary email address,
            /// alias email address, or unique user ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/tokens"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "users" collection of methods.</summary>
    public class UsersResource
    {
        private const string Resource = "users";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public UsersResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            aliases = new AliasesResource(service);
            photos = new PhotosResource(service);

        }

        private readonly AliasesResource aliases;

        /// <summary>Gets the Aliases resource.</summary>
        public virtual AliasesResource Aliases
        {
            get { return aliases; }
        }

        /// <summary>The "aliases" collection of methods.</summary>
        public class AliasesResource
        {
            private const string Resource = "aliases";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public AliasesResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>Remove a alias for the user</summary>
            /// <param name="userKey">Email or immutable Id of the user</param>
            /// <param name="alias">The alias to be
            /// removed</param>
            public virtual DeleteRequest Delete(string userKey, string alias)
            {
                return new DeleteRequest(service, userKey, alias);
            }

            /// <summary>Remove a alias for the user</summary>
            public class DeleteRequest : DirectoryBaseServiceRequest<string>
            {
                /// <summary>Constructs a new Delete request.</summary>
                public DeleteRequest(Google.Apis.Services.IClientService service, string userKey, string alias)
                    : base(service)
                {
                    UserKey = userKey;
                    Alias = alias;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the user</summary>
                [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string UserKey { get; private set; }

                /// <summary>The alias to be removed</summary>
                [Google.Apis.Util.RequestParameterAttribute("alias", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Alias { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "delete"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "DELETE"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "users/{userKey}/aliases/{alias}"; }
                }

                /// <summary>Initializes Delete parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "userKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "userKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "alias", new Google.Apis.Discovery.Parameter
                        {
                            Name = "alias",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Add a alias for the user</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="userKey">Email or immutable Id of the user</param>
            public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.Alias body, string userKey)
            {
                return new InsertRequest(service, body, userKey);
            }

            /// <summary>Add a alias for the user</summary>
            public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Alias>
            {
                /// <summary>Constructs a new Insert request.</summary>
                public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Alias body, string userKey)
                    : base(service)
                {
                    UserKey = userKey;
                    Body = body;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the user</summary>
                [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string UserKey { get; private set; }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.Admin.Directory.directory_v1.Data.Alias Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "insert"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "POST"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "users/{userKey}/aliases"; }
                }

                /// <summary>Initializes Insert parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "userKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "userKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>List all aliases for a user</summary>
            /// <param name="userKey">Email or immutable Id of the user</param>
            public virtual ListRequest List(string userKey)
            {
                return new ListRequest(service, userKey);
            }

            /// <summary>List all aliases for a user</summary>
            public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Aliases>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string userKey)
                    : base(service)
                {
                    UserKey = userKey;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the user</summary>
                [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string UserKey { get; private set; }

                /// <summary>Event on which subscription is intended (if subscribing)</summary>
                [Google.Apis.Util.RequestParameterAttribute("event", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<EventEnum> Event { get; set; }

                /// <summary>Event on which subscription is intended (if subscribing)</summary>
                public enum EventEnum
                {
                    /// <summary>Alias Created Event</summary>
                    [Google.Apis.Util.StringValueAttribute("add")]
                    Add,
                    /// <summary>Alias Deleted Event</summary>
                    [Google.Apis.Util.StringValueAttribute("delete")]
                    Delete,
                }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "users/{userKey}/aliases"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "userKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "userKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "event", new Google.Apis.Discovery.Parameter
                        {
                            Name = "event",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Watch for changes in user aliases list</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="userKey">Email or immutable Id of the user</param>
            public virtual WatchRequest Watch(Google.Apis.Admin.Directory.directory_v1.Data.Channel body, string userKey)
            {
                return new WatchRequest(service, body, userKey);
            }

            /// <summary>Watch for changes in user aliases list</summary>
            public class WatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Channel>
            {
                /// <summary>Constructs a new Watch request.</summary>
                public WatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Channel body, string userKey)
                    : base(service)
                {
                    UserKey = userKey;
                    Body = body;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the user</summary>
                [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string UserKey { get; private set; }

                /// <summary>Event on which subscription is intended (if subscribing)</summary>
                [Google.Apis.Util.RequestParameterAttribute("event", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<EventEnum> Event { get; set; }

                /// <summary>Event on which subscription is intended (if subscribing)</summary>
                public enum EventEnum
                {
                    /// <summary>Alias Created Event</summary>
                    [Google.Apis.Util.StringValueAttribute("add")]
                    Add,
                    /// <summary>Alias Deleted Event</summary>
                    [Google.Apis.Util.StringValueAttribute("delete")]
                    Delete,
                }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.Admin.Directory.directory_v1.Data.Channel Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "watch"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "POST"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "users/{userKey}/aliases/watch"; }
                }

                /// <summary>Initializes Watch parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "userKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "userKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "event", new Google.Apis.Discovery.Parameter
                        {
                            Name = "event",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }
        private readonly PhotosResource photos;

        /// <summary>Gets the Photos resource.</summary>
        public virtual PhotosResource Photos
        {
            get { return photos; }
        }

        /// <summary>The "photos" collection of methods.</summary>
        public class PhotosResource
        {
            private const string Resource = "photos";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public PhotosResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>Remove photos for the user</summary>
            /// <param name="userKey">Email or immutable Id of the user</param>
            public virtual DeleteRequest Delete(string userKey)
            {
                return new DeleteRequest(service, userKey);
            }

            /// <summary>Remove photos for the user</summary>
            public class DeleteRequest : DirectoryBaseServiceRequest<string>
            {
                /// <summary>Constructs a new Delete request.</summary>
                public DeleteRequest(Google.Apis.Services.IClientService service, string userKey)
                    : base(service)
                {
                    UserKey = userKey;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the user</summary>
                [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string UserKey { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "delete"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "DELETE"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "users/{userKey}/photos/thumbnail"; }
                }

                /// <summary>Initializes Delete parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "userKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "userKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Retrieve photo of a user</summary>
            /// <param name="userKey">Email or immutable Id of the user</param>
            public virtual GetRequest Get(string userKey)
            {
                return new GetRequest(service, userKey);
            }

            /// <summary>Retrieve photo of a user</summary>
            public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.UserPhoto>
            {
                /// <summary>Constructs a new Get request.</summary>
                public GetRequest(Google.Apis.Services.IClientService service, string userKey)
                    : base(service)
                {
                    UserKey = userKey;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the user</summary>
                [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string UserKey { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "get"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "users/{userKey}/photos/thumbnail"; }
                }

                /// <summary>Initializes Get parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "userKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "userKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Add a photo for the user. This method supports patch semantics.</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="userKey">Email or immutable Id of the user</param>
            public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.UserPhoto body, string userKey)
            {
                return new PatchRequest(service, body, userKey);
            }

            /// <summary>Add a photo for the user. This method supports patch semantics.</summary>
            public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.UserPhoto>
            {
                /// <summary>Constructs a new Patch request.</summary>
                public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.UserPhoto body, string userKey)
                    : base(service)
                {
                    UserKey = userKey;
                    Body = body;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the user</summary>
                [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string UserKey { get; private set; }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.Admin.Directory.directory_v1.Data.UserPhoto Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "patch"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "PATCH"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "users/{userKey}/photos/thumbnail"; }
                }

                /// <summary>Initializes Patch parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "userKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "userKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Add a photo for the user</summary>
            /// <param name="body">The body of the request.</param>
            /// <param name="userKey">Email or immutable Id of the user</param>
            public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.UserPhoto body, string userKey)
            {
                return new UpdateRequest(service, body, userKey);
            }

            /// <summary>Add a photo for the user</summary>
            public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.UserPhoto>
            {
                /// <summary>Constructs a new Update request.</summary>
                public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.UserPhoto body, string userKey)
                    : base(service)
                {
                    UserKey = userKey;
                    Body = body;
                    InitParameters();
                }


                /// <summary>Email or immutable Id of the user</summary>
                [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string UserKey { get; private set; }


                /// <summary>Gets or sets the body of this request.</summary>
                Google.Apis.Admin.Directory.directory_v1.Data.UserPhoto Body { get; set; }

                ///<summary>Returns the body of the request.</summary>
                protected override object GetBody() { return Body; }

                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "update"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "PUT"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "users/{userKey}/photos/thumbnail"; }
                }

                /// <summary>Initializes Update parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "userKey", new Google.Apis.Discovery.Parameter
                        {
                            Name = "userKey",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }

        /// <summary>Delete user</summary>
        /// <param name="userKey">Email or immutable Id of the user</param>
        public virtual DeleteRequest Delete(string userKey)
        {
            return new DeleteRequest(service, userKey);
        }

        /// <summary>Delete user</summary>
        public class DeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string userKey)
                : base(service)
            {
                UserKey = userKey;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the user</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>retrieve user</summary>
        /// <param name="userKey">Email or immutable Id of the user</param>
        public virtual GetRequest Get(string userKey)
        {
            return new GetRequest(service, userKey);
        }

        /// <summary>retrieve user</summary>
        public class GetRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.User>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string userKey)
                : base(service)
            {
                UserKey = userKey;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the user</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }

            /// <summary>Comma-separated list of schema names. All fields from these schemas are fetched. This should
            /// only be set when projection=custom.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customFieldMask", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string CustomFieldMask { get; set; }

            /// <summary>What subset of fields to fetch for this user.</summary>
            /// [default: basic]
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>What subset of fields to fetch for this user.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Do not include any custom fields for the user.</summary>
                [Google.Apis.Util.StringValueAttribute("basic")]
                Basic,
                /// <summary>Include custom fields from schemas mentioned in customFieldMask.</summary>
                [Google.Apis.Util.StringValueAttribute("custom")]
                Custom,
                /// <summary>Include all fields associated with this user.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
            }

            /// <summary>Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.</summary>
            /// [default: admin_view]
            [Google.Apis.Util.RequestParameterAttribute("viewType", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ViewTypeEnum> ViewType { get; set; }

            /// <summary>Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.</summary>
            public enum ViewTypeEnum
            {
                /// <summary>Fetches the ADMIN_VIEW of the user.</summary>
                [Google.Apis.Util.StringValueAttribute("admin_view")]
                AdminView,
                /// <summary>Fetches the DOMAIN_PUBLIC view of the user.</summary>
                [Google.Apis.Util.StringValueAttribute("domain_public")]
                DomainPublic,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "customFieldMask", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customFieldMask",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "basic",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "viewType", new Google.Apis.Discovery.Parameter
                    {
                        Name = "viewType",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "admin_view",
                        Pattern = null,
                    });
            }

        }

        /// <summary>create user.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual InsertRequest Insert(Google.Apis.Admin.Directory.directory_v1.Data.User body)
        {
            return new InsertRequest(service, body);
        }

        /// <summary>create user.</summary>
        public class InsertRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.User>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.User body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.User Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Retrieve either deleted users or all users in a domain (paginated)</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>Retrieve either deleted users or all users in a domain (paginated)</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Users>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>Comma-separated list of schema names. All fields from these schemas are fetched. This should
            /// only be set when projection=custom.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customFieldMask", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string CustomFieldMask { get; set; }

            /// <summary>Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a
            /// customer, fill this field instead of domain.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Customer { get; set; }

            /// <summary>Name of the domain. Fill this field to get users from only this domain. To return all users in
            /// a multi-domain fill customer field instead.</summary>
            [Google.Apis.Util.RequestParameterAttribute("domain", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Domain { get; set; }

            /// <summary>Event on which subscription is intended (if subscribing)</summary>
            [Google.Apis.Util.RequestParameterAttribute("event", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<EventEnum> Event { get; set; }

            /// <summary>Event on which subscription is intended (if subscribing)</summary>
            public enum EventEnum
            {
                /// <summary>User Created Event</summary>
                [Google.Apis.Util.StringValueAttribute("add")]
                Add,
                /// <summary>User Deleted Event</summary>
                [Google.Apis.Util.StringValueAttribute("delete")]
                Delete,
                /// <summary>User Admin Status Change Event</summary>
                [Google.Apis.Util.StringValueAttribute("makeAdmin")]
                MakeAdmin,
                /// <summary>User Undeleted Event</summary>
                [Google.Apis.Util.StringValueAttribute("undelete")]
                Undelete,
                /// <summary>User Updated Event</summary>
                [Google.Apis.Util.StringValueAttribute("update")]
                Update,
            }

            /// <summary>Maximum number of results to return. Default is 100. Max allowed is 500</summary>
            /// [minimum: 1]
            /// [maximum: 500]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Column to use for sorting results</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderBy", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<OrderByEnum> OrderBy { get; set; }

            /// <summary>Column to use for sorting results</summary>
            public enum OrderByEnum
            {
                /// <summary>Primary email of the user.</summary>
                [Google.Apis.Util.StringValueAttribute("email")]
                Email,
                /// <summary>User's family name.</summary>
                [Google.Apis.Util.StringValueAttribute("familyName")]
                FamilyName,
                /// <summary>User's given name.</summary>
                [Google.Apis.Util.StringValueAttribute("givenName")]
                GivenName,
            }

            /// <summary>Token to specify next page in the list</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>What subset of fields to fetch for this user.</summary>
            /// [default: basic]
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>What subset of fields to fetch for this user.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Do not include any custom fields for the user.</summary>
                [Google.Apis.Util.StringValueAttribute("basic")]
                Basic,
                /// <summary>Include custom fields from schemas mentioned in customFieldMask.</summary>
                [Google.Apis.Util.StringValueAttribute("custom")]
                Custom,
                /// <summary>Include all fields associated with this user.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
            }

            /// <summary>Query string search. Should be of the form "". Complete documentation is at
            /// https://developers.google.com/admin-sdk/directory/v1/guides/search-users</summary>
            [Google.Apis.Util.RequestParameterAttribute("query", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Query { get; set; }

            /// <summary>If set to true retrieves the list of deleted users. Default is false</summary>
            [Google.Apis.Util.RequestParameterAttribute("showDeleted", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string ShowDeleted { get; set; }

            /// <summary>Whether to return results in ascending or descending order.</summary>
            [Google.Apis.Util.RequestParameterAttribute("sortOrder", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<SortOrderEnum> SortOrder { get; set; }

            /// <summary>Whether to return results in ascending or descending order.</summary>
            public enum SortOrderEnum
            {
                /// <summary>Ascending order.</summary>
                [Google.Apis.Util.StringValueAttribute("ASCENDING")]
                ASCENDING,
                /// <summary>Descending order.</summary>
                [Google.Apis.Util.StringValueAttribute("DESCENDING")]
                DESCENDING,
            }

            /// <summary>Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.</summary>
            /// [default: admin_view]
            [Google.Apis.Util.RequestParameterAttribute("viewType", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ViewTypeEnum> ViewType { get; set; }

            /// <summary>Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.</summary>
            public enum ViewTypeEnum
            {
                /// <summary>Fetches the ADMIN_VIEW of the user.</summary>
                [Google.Apis.Util.StringValueAttribute("admin_view")]
                AdminView,
                /// <summary>Fetches the DOMAIN_PUBLIC view of the user.</summary>
                [Google.Apis.Util.StringValueAttribute("domain_public")]
                DomainPublic,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customFieldMask", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customFieldMask",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "domain", new Google.Apis.Discovery.Parameter
                    {
                        Name = "domain",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "event", new Google.Apis.Discovery.Parameter
                    {
                        Name = "event",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderBy", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderBy",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "basic",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "query", new Google.Apis.Discovery.Parameter
                    {
                        Name = "query",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "showDeleted", new Google.Apis.Discovery.Parameter
                    {
                        Name = "showDeleted",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "sortOrder", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sortOrder",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "viewType", new Google.Apis.Discovery.Parameter
                    {
                        Name = "viewType",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "admin_view",
                        Pattern = null,
                    });
            }

        }

        /// <summary>change admin status of a user</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="userKey">Email or immutable Id of the user as admin</param>
        public virtual MakeAdminRequest MakeAdmin(Google.Apis.Admin.Directory.directory_v1.Data.UserMakeAdmin body, string userKey)
        {
            return new MakeAdminRequest(service, body, userKey);
        }

        /// <summary>change admin status of a user</summary>
        public class MakeAdminRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new MakeAdmin request.</summary>
            public MakeAdminRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.UserMakeAdmin body, string userKey)
                : base(service)
            {
                UserKey = userKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the user as admin</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.UserMakeAdmin Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "makeAdmin"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/makeAdmin"; }
            }

            /// <summary>Initializes MakeAdmin parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>update user. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="userKey">Email or immutable Id of the user. If Id, it should match with id of user object</param>
        public virtual PatchRequest Patch(Google.Apis.Admin.Directory.directory_v1.Data.User body, string userKey)
        {
            return new PatchRequest(service, body, userKey);
        }

        /// <summary>update user. This method supports patch semantics.</summary>
        public class PatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.User>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.User body, string userKey)
                : base(service)
            {
                UserKey = userKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the user. If Id, it should match with id of user object</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.User Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Undelete a deleted user</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="userKey">The immutable id of the user</param>
        public virtual UndeleteRequest Undelete(Google.Apis.Admin.Directory.directory_v1.Data.UserUndelete body, string userKey)
        {
            return new UndeleteRequest(service, body, userKey);
        }

        /// <summary>Undelete a deleted user</summary>
        public class UndeleteRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Undelete request.</summary>
            public UndeleteRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.UserUndelete body, string userKey)
                : base(service)
            {
                UserKey = userKey;
                Body = body;
                InitParameters();
            }


            /// <summary>The immutable id of the user</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.UserUndelete Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "undelete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/undelete"; }
            }

            /// <summary>Initializes Undelete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>update user</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="userKey">Email or immutable Id of the user. If Id, it should match with id of user object</param>
        public virtual UpdateRequest Update(Google.Apis.Admin.Directory.directory_v1.Data.User body, string userKey)
        {
            return new UpdateRequest(service, body, userKey);
        }

        /// <summary>update user</summary>
        public class UpdateRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.User>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.User body, string userKey)
                : base(service)
            {
                UserKey = userKey;
                Body = body;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the user. If Id, it should match with id of user object</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.User Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Watch for changes in users list</summary>
        /// <param name="body">The body of the request.</param>
        public virtual WatchRequest Watch(Google.Apis.Admin.Directory.directory_v1.Data.Channel body)
        {
            return new WatchRequest(service, body);
        }

        /// <summary>Watch for changes in users list</summary>
        public class WatchRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.Channel>
        {
            /// <summary>Constructs a new Watch request.</summary>
            public WatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Admin.Directory.directory_v1.Data.Channel body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }


            /// <summary>Comma-separated list of schema names. All fields from these schemas are fetched. This should
            /// only be set when projection=custom.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customFieldMask", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string CustomFieldMask { get; set; }

            /// <summary>Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a
            /// customer, fill this field instead of domain.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customer", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Customer { get; set; }

            /// <summary>Name of the domain. Fill this field to get users from only this domain. To return all users in
            /// a multi-domain fill customer field instead.</summary>
            [Google.Apis.Util.RequestParameterAttribute("domain", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Domain { get; set; }

            /// <summary>Event on which subscription is intended (if subscribing)</summary>
            [Google.Apis.Util.RequestParameterAttribute("event", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<EventEnum> Event { get; set; }

            /// <summary>Event on which subscription is intended (if subscribing)</summary>
            public enum EventEnum
            {
                /// <summary>User Created Event</summary>
                [Google.Apis.Util.StringValueAttribute("add")]
                Add,
                /// <summary>User Deleted Event</summary>
                [Google.Apis.Util.StringValueAttribute("delete")]
                Delete,
                /// <summary>User Admin Status Change Event</summary>
                [Google.Apis.Util.StringValueAttribute("makeAdmin")]
                MakeAdmin,
                /// <summary>User Undeleted Event</summary>
                [Google.Apis.Util.StringValueAttribute("undelete")]
                Undelete,
                /// <summary>User Updated Event</summary>
                [Google.Apis.Util.StringValueAttribute("update")]
                Update,
            }

            /// <summary>Maximum number of results to return. Default is 100. Max allowed is 500</summary>
            /// [minimum: 1]
            /// [maximum: 500]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Column to use for sorting results</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderBy", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<OrderByEnum> OrderBy { get; set; }

            /// <summary>Column to use for sorting results</summary>
            public enum OrderByEnum
            {
                /// <summary>Primary email of the user.</summary>
                [Google.Apis.Util.StringValueAttribute("email")]
                Email,
                /// <summary>User's family name.</summary>
                [Google.Apis.Util.StringValueAttribute("familyName")]
                FamilyName,
                /// <summary>User's given name.</summary>
                [Google.Apis.Util.StringValueAttribute("givenName")]
                GivenName,
            }

            /// <summary>Token to specify next page in the list</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>What subset of fields to fetch for this user.</summary>
            /// [default: basic]
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>What subset of fields to fetch for this user.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Do not include any custom fields for the user.</summary>
                [Google.Apis.Util.StringValueAttribute("basic")]
                Basic,
                /// <summary>Include custom fields from schemas mentioned in customFieldMask.</summary>
                [Google.Apis.Util.StringValueAttribute("custom")]
                Custom,
                /// <summary>Include all fields associated with this user.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
            }

            /// <summary>Query string search. Should be of the form "". Complete documentation is at
            /// https://developers.google.com/admin-sdk/directory/v1/guides/search-users</summary>
            [Google.Apis.Util.RequestParameterAttribute("query", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Query { get; set; }

            /// <summary>If set to true retrieves the list of deleted users. Default is false</summary>
            [Google.Apis.Util.RequestParameterAttribute("showDeleted", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string ShowDeleted { get; set; }

            /// <summary>Whether to return results in ascending or descending order.</summary>
            [Google.Apis.Util.RequestParameterAttribute("sortOrder", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<SortOrderEnum> SortOrder { get; set; }

            /// <summary>Whether to return results in ascending or descending order.</summary>
            public enum SortOrderEnum
            {
                /// <summary>Ascending order.</summary>
                [Google.Apis.Util.StringValueAttribute("ASCENDING")]
                ASCENDING,
                /// <summary>Descending order.</summary>
                [Google.Apis.Util.StringValueAttribute("DESCENDING")]
                DESCENDING,
            }

            /// <summary>Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.</summary>
            /// [default: admin_view]
            [Google.Apis.Util.RequestParameterAttribute("viewType", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ViewTypeEnum> ViewType { get; set; }

            /// <summary>Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.</summary>
            public enum ViewTypeEnum
            {
                /// <summary>Fetches the ADMIN_VIEW of the user.</summary>
                [Google.Apis.Util.StringValueAttribute("admin_view")]
                AdminView,
                /// <summary>Fetches the DOMAIN_PUBLIC view of the user.</summary>
                [Google.Apis.Util.StringValueAttribute("domain_public")]
                DomainPublic,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Admin.Directory.directory_v1.Data.Channel Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "watch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/watch"; }
            }

            /// <summary>Initializes Watch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "customFieldMask", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customFieldMask",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "customer", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customer",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "domain", new Google.Apis.Discovery.Parameter
                    {
                        Name = "domain",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "event", new Google.Apis.Discovery.Parameter
                    {
                        Name = "event",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderBy", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderBy",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "basic",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "query", new Google.Apis.Discovery.Parameter
                    {
                        Name = "query",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "showDeleted", new Google.Apis.Discovery.Parameter
                    {
                        Name = "showDeleted",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "sortOrder", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sortOrder",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "viewType", new Google.Apis.Discovery.Parameter
                    {
                        Name = "viewType",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "admin_view",
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "verificationCodes" collection of methods.</summary>
    public class VerificationCodesResource
    {
        private const string Resource = "verificationCodes";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public VerificationCodesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Generate new backup verification codes for the user.</summary>
        /// <param name="userKey">Email or immutable Id of the user</param>
        public virtual GenerateRequest Generate(string userKey)
        {
            return new GenerateRequest(service, userKey);
        }

        /// <summary>Generate new backup verification codes for the user.</summary>
        public class GenerateRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Generate request.</summary>
            public GenerateRequest(Google.Apis.Services.IClientService service, string userKey)
                : base(service)
            {
                UserKey = userKey;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the user</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "generate"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/verificationCodes/generate"; }
            }

            /// <summary>Initializes Generate parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Invalidate the current backup verification codes for the user.</summary>
        /// <param name="userKey">Email or immutable Id of the user</param>
        public virtual InvalidateRequest Invalidate(string userKey)
        {
            return new InvalidateRequest(service, userKey);
        }

        /// <summary>Invalidate the current backup verification codes for the user.</summary>
        public class InvalidateRequest : DirectoryBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Invalidate request.</summary>
            public InvalidateRequest(Google.Apis.Services.IClientService service, string userKey)
                : base(service)
            {
                UserKey = userKey;
                InitParameters();
            }


            /// <summary>Email or immutable Id of the user</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "invalidate"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/verificationCodes/invalidate"; }
            }

            /// <summary>Initializes Invalidate parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Returns the current set of valid backup verification codes for the specified user.</summary>
        /// <param name="userKey">Identifies the user in the API request. The value can be the user's primary email address,
        /// alias email address, or unique user ID.</param>
        public virtual ListRequest List(string userKey)
        {
            return new ListRequest(service, userKey);
        }

        /// <summary>Returns the current set of valid backup verification codes for the specified user.</summary>
        public class ListRequest : DirectoryBaseServiceRequest<Google.Apis.Admin.Directory.directory_v1.Data.VerificationCodes>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string userKey)
                : base(service)
            {
                UserKey = userKey;
                InitParameters();
            }


            /// <summary>Identifies the user in the API request. The value can be the user's primary email address,
            /// alias email address, or unique user ID.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string UserKey { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "users/{userKey}/verificationCodes"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "userKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "userKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.Admin.Directory.directory_v1.Data
{    

    /// <summary>JSON template for Alias object in Directory API.</summary>
    public class Alias : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A alias email</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("alias")]
        public virtual string AliasValue { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Unique id of the group (Read-only) Unique id of the user (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Group's primary email (Read-only) User's primary email (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primaryEmail")]
        public virtual string PrimaryEmail { get; set; } 

    }    

    /// <summary>JSON response template to list aliases in Directory API.</summary>
    public class Aliases : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of alias objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("aliases")]
        public virtual System.Collections.Generic.IList<Alias> AliasesValue { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

    }    

    /// <summary>The template that returns individual ASP (Access Code) data.</summary>
    public class Asp : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The unique ID of the ASP.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("codeId")]
        public virtual System.Nullable<int> CodeId { get; set; } 

        /// <summary>The time when the ASP was created. Expressed in Unix time format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationTime")]
        public virtual System.Nullable<long> CreationTime { get; set; } 

        /// <summary>ETag of the ASP.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The type of the API resource. This is always admin#directory#asp.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The time when the ASP was last used. Expressed in Unix time format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastTimeUsed")]
        public virtual System.Nullable<long> LastTimeUsed { get; set; } 

        /// <summary>The name of the application that the user, represented by their userId, entered when the ASP was
        /// created.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The unique ID of the user who issued the ASP.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("userKey")]
        public virtual string UserKey { get; set; } 

    }    

    public class Asps : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>A list of ASP resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Asp> Items { get; set; } 

        /// <summary>The type of the API resource. This is always admin#directory#aspList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

    }    

    /// <summary>JSON template for Calendar Resource object in Directory API.</summary>
    public class CalendarResource : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etags")]
        public virtual string Etags { get; set; } 

        /// <summary>The type of the resource. For calendar resources, the value is
        /// admin#directory#resources#calendars#CalendarResource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The brief description of the calendar resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceDescription")]
        public virtual string ResourceDescription { get; set; } 

        /// <summary>The read-only email ID for the calendar resource. Generated as part of creating a new calendar
        /// resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceEmail")]
        public virtual string ResourceEmail { get; set; } 

        /// <summary>The unique ID for the calendar resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceId")]
        public virtual string ResourceId { get; set; } 

        /// <summary>The name of the calendar resource. For example, Training Room 1A</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceName")]
        public virtual string ResourceName { get; set; } 

        /// <summary>The type of the calendar resource. Used for grouping resources in the calendar user
        /// interface.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceType")]
        public virtual string ResourceType { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for Calendar Resource List Response object in Directory API.</summary>
    public class CalendarResources : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The CalendarResources in this page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<CalendarResource> Items { get; set; } 

        /// <summary>Identifies this as a collection of CalendarResources. This is always
        /// admin#directory#resources#calendars#calendarResourcesList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The continuation token, used to page through large result sets. Provide this value in a subsequent
        /// request to return the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    /// <summary>An notification channel used to watch for resource changes.</summary>
    public class Channel : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The address where notifications are delivered for this channel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("address")]
        public virtual string Address { get; set; } 

        /// <summary>Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds.
        /// Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expiration")]
        public virtual System.Nullable<long> Expiration { get; set; } 

        /// <summary>A UUID or similar unique string that identifies this channel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed
        /// string "api#channel".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Additional parameters controlling delivery channel behavior. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("params")]
        public virtual System.Collections.Generic.IDictionary<string,string> Params__ { get; set; } 

        /// <summary>A Boolean value to indicate whether payload is wanted. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("payload")]
        public virtual System.Nullable<bool> Payload { get; set; } 

        /// <summary>An opaque ID that identifies the resource being watched on this channel. Stable across different
        /// API versions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceId")]
        public virtual string ResourceId { get; set; } 

        /// <summary>A version-specific identifier for the watched resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceUri")]
        public virtual string ResourceUri { get; set; } 

        /// <summary>An arbitrary string delivered to the target address with each notification delivered over this
        /// channel. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("token")]
        public virtual string Token { get; set; } 

        /// <summary>The type of delivery mechanism used for this channel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for Chrome Os Device resource in Directory API.</summary>
    public class ChromeOsDevice : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of active time ranges (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("activeTimeRanges")]
        public virtual System.Collections.Generic.IList<ChromeOsDevice.ActiveTimeRangesData> ActiveTimeRanges { get; set; } 

        /// <summary>AssetId specified during enrollment or through later annotation</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("annotatedAssetId")]
        public virtual string AnnotatedAssetId { get; set; } 

        /// <summary>Address or location of the device as noted by the administrator</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("annotatedLocation")]
        public virtual string AnnotatedLocation { get; set; } 

        /// <summary>User of the device</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("annotatedUser")]
        public virtual string AnnotatedUser { get; set; } 

        /// <summary>Chromebook boot mode (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bootMode")]
        public virtual string BootMode { get; set; } 

        /// <summary>Unique identifier of Chrome OS Device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("deviceId")]
        public virtual string DeviceId { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Chromebook Mac Address on ethernet network interface (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ethernetMacAddress")]
        public virtual string EthernetMacAddress { get; set; } 

        /// <summary>Chromebook firmware version (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("firmwareVersion")]
        public virtual string FirmwareVersion { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Date and time the device was last enrolled (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastEnrollmentTime")]
        public virtual string LastEnrollmentTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="LastEnrollmentTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> LastEnrollmentTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(LastEnrollmentTimeRaw);
            }
            set
            {
                LastEnrollmentTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Date and time the device was last synchronized with the policy settings in the Google Apps
        /// administrator control panel (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastSync")]
        public virtual string LastSyncRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="LastSyncRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> LastSync
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(LastSyncRaw);
            }
            set
            {
                LastSyncRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Chromebook Mac Address on wifi network interface (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("macAddress")]
        public virtual string MacAddress { get; set; } 

        /// <summary>Mobile Equipment identifier for the 3G mobile card in the Chromebook (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("meid")]
        public virtual string Meid { get; set; } 

        /// <summary>Chromebook Model (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("model")]
        public virtual string Model { get; set; } 

        /// <summary>Notes added by the administrator</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("notes")]
        public virtual string Notes { get; set; } 

        /// <summary>Chromebook order number (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("orderNumber")]
        public virtual string OrderNumber { get; set; } 

        /// <summary>OrgUnit of the device</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("orgUnitPath")]
        public virtual string OrgUnitPath { get; set; } 

        /// <summary>Chromebook Os Version (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("osVersion")]
        public virtual string OsVersion { get; set; } 

        /// <summary>Chromebook platform version (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("platformVersion")]
        public virtual string PlatformVersion { get; set; } 

        /// <summary>List of recent device users, in descending order by last login time (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("recentUsers")]
        public virtual System.Collections.Generic.IList<ChromeOsDevice.RecentUsersData> RecentUsers { get; set; } 

        /// <summary>Chromebook serial number (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serialNumber")]
        public virtual string SerialNumber { get; set; } 

        /// <summary>status of the device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>Final date the device will be supported (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("supportEndDate")]
        public virtual string SupportEndDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="SupportEndDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> SupportEndDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(SupportEndDateRaw);
            }
            set
            {
                SupportEndDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Will Chromebook auto renew after support end date (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("willAutoRenew")]
        public virtual System.Nullable<bool> WillAutoRenew { get; set; } 

        

        public class ActiveTimeRangesData
        {
            /// <summary>Duration in milliseconds</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("activeTime")]
            public virtual System.Nullable<int> ActiveTime { get; set; } 

            /// <summary>Date of usage</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("date")]
            public virtual string Date { get; set; } 

        }    

        public class RecentUsersData
        {
            /// <summary>Email address of the user. Present only if the user type is managed</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("email")]
            public virtual string Email { get; set; } 

            /// <summary>The type of the user</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; } 

        }
    }    

    /// <summary>JSON request template for firing actions on ChromeOs Device in Directory Devices API.</summary>
    public class ChromeOsDeviceAction : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Action to be taken on the ChromeOs Device</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("action")]
        public virtual string Action { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("deprovisionReason")]
        public virtual string DeprovisionReason { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON response template for List Chrome OS Devices operation in Directory API.</summary>
    public class ChromeOsDevices : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of Chrome OS Device objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("chromeosdevices")]
        public virtual System.Collections.Generic.IList<ChromeOsDevice> Chromeosdevices { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Token used to access next page of this result.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    /// <summary>JSON template for Customer Resource object in Directory API.</summary>
    public class Customer : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The customer's secondary contact email address. This email address cannot be on the same domain as
        /// the customerDomain</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("alternateEmail")]
        public virtual string AlternateEmail { get; set; } 

        /// <summary>The customer's creation time (Readonly)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customerCreationTime")]
        public virtual string CustomerCreationTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="CustomerCreationTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> CustomerCreationTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(CustomerCreationTimeRaw);
            }
            set
            {
                CustomerCreationTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The customer's primary domain name string. Do not include the www prefix when creating a new
        /// customer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customerDomain")]
        public virtual string CustomerDomain { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The unique ID for the customer's Google account. (Readonly)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Identifies the resource as a customer. Value: admin#directory#customer</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The customer's ISO 639-2 language code. The default value is en-US</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("language")]
        public virtual string Language { get; set; } 

        /// <summary>The customer's contact phone number in E.164 format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("phoneNumber")]
        public virtual string PhoneNumber { get; set; } 

        /// <summary>The customer's postal address information.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("postalAddress")]
        public virtual CustomerPostalAddress PostalAddress { get; set; } 

    }    

    /// <summary>JSON template for postal address of a customer.</summary>
    public class CustomerPostalAddress : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A customer's physical address. The address can be composed of one to three lines.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("addressLine1")]
        public virtual string AddressLine1 { get; set; } 

        /// <summary>Address line 2 of the address.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("addressLine2")]
        public virtual string AddressLine2 { get; set; } 

        /// <summary>Address line 3 of the address.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("addressLine3")]
        public virtual string AddressLine3 { get; set; } 

        /// <summary>The customer contact's name.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("contactName")]
        public virtual string ContactName { get; set; } 

        /// <summary>This is a required property. For countryCode information see the ISO 3166 country code
        /// elements.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("countryCode")]
        public virtual string CountryCode { get; set; } 

        /// <summary>Name of the locality. An example of a locality value is the city of San Francisco.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("locality")]
        public virtual string Locality { get; set; } 

        /// <summary>The company or company division name.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("organizationName")]
        public virtual string OrganizationName { get; set; } 

        /// <summary>The postal code. A postalCode example is a postal zip code such as 10009. This is in accordance
        /// with - http://portablecontacts.net/draft-spec.html#address_element.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("postalCode")]
        public virtual string PostalCode { get; set; } 

        /// <summary>Name of the region. An example of a region value is NY for the state of New York.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("region")]
        public virtual string Region { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for Domain Alias object in Directory API.</summary>
    public class DomainAlias : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The creation time of the domain alias. (Read-only).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationTime")]
        public virtual System.Nullable<long> CreationTime { get; set; } 

        /// <summary>The domain alias name.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domainAliasName")]
        public virtual string DomainAliasName { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The parent domain name that the domain alias is associated with. This can either be a primary or
        /// secondary domain name within a customer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("parentDomainName")]
        public virtual string ParentDomainName { get; set; } 

        /// <summary>Indicates the verification state of a domain alias. (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("verified")]
        public virtual System.Nullable<bool> Verified { get; set; } 

    }    

    /// <summary>JSON response template to list domain aliases in Directory API.</summary>
    public class DomainAliases : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of domain alias objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domainAliases")]
        public virtual System.Collections.Generic.IList<DomainAlias> DomainAliasesValue { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

    }    

    /// <summary>JSON template for Domain object in Directory API.</summary>
    public class Domains : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Creation time of the domain. (Read-only).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationTime")]
        public virtual System.Nullable<long> CreationTime { get; set; } 

        /// <summary>List of domain alias objects. (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domainAliases")]
        public virtual System.Collections.Generic.IList<DomainAlias> DomainAliases { get; set; } 

        /// <summary>The domain name of the customer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domainName")]
        public virtual string DomainName { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Indicates if the domain is a primary domain (Read-only).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isPrimary")]
        public virtual System.Nullable<bool> IsPrimary { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Indicates the verification state of a domain. (Read-only).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("verified")]
        public virtual System.Nullable<bool> Verified { get; set; } 

    }    

    /// <summary>JSON response template to list Domains in Directory API.</summary>
    public class Domains2 : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of domain objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domains")]
        public virtual System.Collections.Generic.IList<Domains> Domains { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

    }    

    /// <summary>JSON template for Group resource in Directory API.</summary>
    public class Group : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Is the group created by admin (Read-only) *</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("adminCreated")]
        public virtual System.Nullable<bool> AdminCreated { get; set; } 

        /// <summary>List of aliases (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("aliases")]
        public virtual System.Collections.Generic.IList<string> Aliases { get; set; } 

        /// <summary>Description of the group</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>Group direct members count</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("directMembersCount")]
        public virtual System.Nullable<long> DirectMembersCount { get; set; } 

        /// <summary>Email of Group</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("email")]
        public virtual string Email { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Unique identifier of Group (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Group name</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>List of non editable aliases (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nonEditableAliases")]
        public virtual System.Collections.Generic.IList<string> NonEditableAliases { get; set; } 

    }    

    /// <summary>JSON response template for List Groups operation in Directory API.</summary>
    public class Groups : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>List of group objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("groups")]
        public virtual System.Collections.Generic.IList<Group> GroupsValue { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Token used to access next page of this result.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    /// <summary>JSON template for Member resource in Directory API.</summary>
    public class Member : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Email of member (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("email")]
        public virtual string Email { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Unique identifier of customer member (Read-only) Unique identifier of group (Read-only) Unique
        /// identifier of member (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Role of member</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("role")]
        public virtual string Role { get; set; } 

        /// <summary>Status of member (Immutable)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>Type of member (Immutable)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

    }    

    /// <summary>JSON response template for List Members operation in Directory API.</summary>
    public class Members : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>List of member objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("members")]
        public virtual System.Collections.Generic.IList<Member> MembersValue { get; set; } 

        /// <summary>Token used to access next page of this result.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    /// <summary>JSON template for Mobile Device resource in Directory API.</summary>
    public class MobileDevice : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Adb (USB debugging) enabled or disabled on device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("adbStatus")]
        public virtual System.Nullable<bool> AdbStatus { get; set; } 

        /// <summary>List of applications installed on Mobile Device</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("applications")]
        public virtual System.Collections.Generic.IList<MobileDevice.ApplicationsData> Applications { get; set; } 

        /// <summary>Mobile Device Baseband version (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("basebandVersion")]
        public virtual string BasebandVersion { get; set; } 

        /// <summary>Mobile Device Bootloader version (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bootloaderVersion")]
        public virtual string BootloaderVersion { get; set; } 

        /// <summary>Mobile Device Brand (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("brand")]
        public virtual string Brand { get; set; } 

        /// <summary>Mobile Device Build number (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("buildNumber")]
        public virtual string BuildNumber { get; set; } 

        /// <summary>The default locale used on the Mobile Device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("defaultLanguage")]
        public virtual string DefaultLanguage { get; set; } 

        /// <summary>Developer options enabled or disabled on device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("developerOptionsStatus")]
        public virtual System.Nullable<bool> DeveloperOptionsStatus { get; set; } 

        /// <summary>Mobile Device compromised status (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("deviceCompromisedStatus")]
        public virtual string DeviceCompromisedStatus { get; set; } 

        /// <summary>Mobile Device serial number (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("deviceId")]
        public virtual string DeviceId { get; set; } 

        /// <summary>DevicePasswordStatus (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("devicePasswordStatus")]
        public virtual string DevicePasswordStatus { get; set; } 

        /// <summary>List of owner user's email addresses (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("email")]
        public virtual System.Collections.Generic.IList<string> Email { get; set; } 

        /// <summary>Mobile Device Encryption Status (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("encryptionStatus")]
        public virtual string EncryptionStatus { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Date and time the device was first synchronized with the policy settings in the Google Apps
        /// administrator control panel (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("firstSync")]
        public virtual string FirstSyncRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="FirstSyncRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> FirstSync
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(FirstSyncRaw);
            }
            set
            {
                FirstSyncRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Mobile Device Hardware (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("hardware")]
        public virtual string Hardware { get; set; } 

        /// <summary>Mobile Device Hardware Id (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("hardwareId")]
        public virtual string HardwareId { get; set; } 

        /// <summary>Mobile Device IMEI number (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("imei")]
        public virtual string Imei { get; set; } 

        /// <summary>Mobile Device Kernel version (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kernelVersion")]
        public virtual string KernelVersion { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Date and time the device was last synchronized with the policy settings in the Google Apps
        /// administrator control panel (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastSync")]
        public virtual string LastSyncRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="LastSyncRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> LastSync
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(LastSyncRaw);
            }
            set
            {
                LastSyncRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Boolean indicating if this account is on owner/primary profile or not (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("managedAccountIsOnOwnerProfile")]
        public virtual System.Nullable<bool> ManagedAccountIsOnOwnerProfile { get; set; } 

        /// <summary>Mobile Device manufacturer (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("manufacturer")]
        public virtual string Manufacturer { get; set; } 

        /// <summary>Mobile Device MEID number (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("meid")]
        public virtual string Meid { get; set; } 

        /// <summary>Name of the model of the device</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("model")]
        public virtual string Model { get; set; } 

        /// <summary>List of owner user's names (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual System.Collections.Generic.IList<string> Name { get; set; } 

        /// <summary>Mobile Device mobile or network operator (if available) (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("networkOperator")]
        public virtual string NetworkOperator { get; set; } 

        /// <summary>Name of the mobile operating system</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("os")]
        public virtual string Os { get; set; } 

        /// <summary>List of accounts added on device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("otherAccountsInfo")]
        public virtual System.Collections.Generic.IList<string> OtherAccountsInfo { get; set; } 

        /// <summary>DMAgentPermission (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("privilege")]
        public virtual string Privilege { get; set; } 

        /// <summary>Mobile Device release version version (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("releaseVersion")]
        public virtual string ReleaseVersion { get; set; } 

        /// <summary>Unique identifier of Mobile Device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceId")]
        public virtual string ResourceId { get; set; } 

        /// <summary>Mobile Device Security patch level (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("securityPatchLevel")]
        public virtual System.Nullable<long> SecurityPatchLevel { get; set; } 

        /// <summary>Mobile Device SSN or Serial Number (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serialNumber")]
        public virtual string SerialNumber { get; set; } 

        /// <summary>Status of the device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>Work profile supported on device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("supportsWorkProfile")]
        public virtual System.Nullable<bool> SupportsWorkProfile { get; set; } 

        /// <summary>The type of device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>Unknown sources enabled or disabled on device (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("unknownSourcesStatus")]
        public virtual System.Nullable<bool> UnknownSourcesStatus { get; set; } 

        /// <summary>Mobile Device user agent</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("userAgent")]
        public virtual string UserAgent { get; set; } 

        /// <summary>Mobile Device WiFi MAC address (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("wifiMacAddress")]
        public virtual string WifiMacAddress { get; set; } 

        

        public class ApplicationsData
        {
            /// <summary>Display name of application</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("displayName")]
            public virtual string DisplayName { get; set; } 

            /// <summary>Package name of application</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("packageName")]
            public virtual string PackageName { get; set; } 

            /// <summary>List of Permissions for application</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("permission")]
            public virtual System.Collections.Generic.IList<string> Permission { get; set; } 

            /// <summary>Version code of application</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("versionCode")]
            public virtual System.Nullable<int> VersionCode { get; set; } 

            /// <summary>Version name of application</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("versionName")]
            public virtual string VersionName { get; set; } 

        }
    }    

    /// <summary>JSON request template for firing commands on Mobile Device in Directory Devices API.</summary>
    public class MobileDeviceAction : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Action to be taken on the Mobile Device</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("action")]
        public virtual string Action { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON response template for List Mobile Devices operation in Directory API.</summary>
    public class MobileDevices : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>List of Mobile Device objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mobiledevices")]
        public virtual System.Collections.Generic.IList<MobileDevice> Mobiledevices { get; set; } 

        /// <summary>Token used to access next page of this result.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    /// <summary>Template for a notification resource.</summary>
    public class Notification : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Body of the notification (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("body")]
        public virtual string Body { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Address from which the notification is received (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fromAddress")]
        public virtual string FromAddress { get; set; } 

        /// <summary>Boolean indicating whether the notification is unread or not.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isUnread")]
        public virtual System.Nullable<bool> IsUnread { get; set; } 

        /// <summary>The type of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("notificationId")]
        public virtual string NotificationId { get; set; } 

        /// <summary>Time at which notification was sent (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sendTime")]
        public virtual string SendTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="SendTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> SendTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(SendTimeRaw);
            }
            set
            {
                SendTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Subject of the notification (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("subject")]
        public virtual string Subject { get; set; } 

    }    

    /// <summary>Template for notifications list response.</summary>
    public class Notifications : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>List of notifications in this page.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Notification> Items { get; set; } 

        /// <summary>The type of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Token for fetching the next page of notifications.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>Number of unread notification for the domain.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("unreadNotificationsCount")]
        public virtual System.Nullable<int> UnreadNotificationsCount { get; set; } 

    }    

    /// <summary>JSON template for Org Unit resource in Directory API.</summary>
    public class OrgUnit : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Should block inheritance</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("blockInheritance")]
        public virtual System.Nullable<bool> BlockInheritance { get; set; } 

        /// <summary>Description of OrgUnit</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Name of OrgUnit</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>Id of OrgUnit</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("orgUnitId")]
        public virtual string OrgUnitId { get; set; } 

        /// <summary>Path of OrgUnit</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("orgUnitPath")]
        public virtual string OrgUnitPath { get; set; } 

        /// <summary>Id of parent OrgUnit</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("parentOrgUnitId")]
        public virtual string ParentOrgUnitId { get; set; } 

        /// <summary>Path of parent OrgUnit</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("parentOrgUnitPath")]
        public virtual string ParentOrgUnitPath { get; set; } 

    }    

    /// <summary>JSON response template for List Organization Units operation in Directory API.</summary>
    public class OrgUnits : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>List of user objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("organizationUnits")]
        public virtual System.Collections.Generic.IList<OrgUnit> OrganizationUnits { get; set; } 

    }    

    /// <summary>JSON template for privilege resource in Directory API.</summary>
    public class Privilege : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A list of child privileges. Privileges for a service form a tree. Each privilege can have a list of
        /// child privileges; this list is empty for a leaf privilege.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("childPrivileges")]
        public virtual System.Collections.Generic.IList<Privilege> ChildPrivileges { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>If the privilege can be restricted to an organization unit.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isOuScopable")]
        public virtual System.Nullable<bool> IsOuScopable { get; set; } 

        /// <summary>The type of the API resource. This is always admin#directory#privilege.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The name of the privilege.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("privilegeName")]
        public virtual string PrivilegeName { get; set; } 

        /// <summary>The obfuscated ID of the service this privilege is for.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceId")]
        public virtual string ServiceId { get; set; } 

        /// <summary>The name of the service this privilege is for.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceName")]
        public virtual string ServiceName { get; set; } 

    }    

    /// <summary>JSON response template for List privileges operation in Directory API.</summary>
    public class Privileges : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>A list of Privilege resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Privilege> Items { get; set; } 

        /// <summary>The type of the API resource. This is always admin#directory#privileges.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

    }    

    /// <summary>JSON template for role resource in Directory API.</summary>
    public class Role : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Returns true if the role is a super admin role.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isSuperAdminRole")]
        public virtual System.Nullable<bool> IsSuperAdminRole { get; set; } 

        /// <summary>Returns true if this is a pre-defined system role.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isSystemRole")]
        public virtual System.Nullable<bool> IsSystemRole { get; set; } 

        /// <summary>The type of the API resource. This is always admin#directory#role.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A short description of the role.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("roleDescription")]
        public virtual string RoleDescription { get; set; } 

        /// <summary>ID of the role.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("roleId")]
        public virtual System.Nullable<long> RoleId { get; set; } 

        /// <summary>Name of the role.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("roleName")]
        public virtual string RoleName { get; set; } 

        /// <summary>The set of privileges that are granted to this role.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rolePrivileges")]
        public virtual System.Collections.Generic.IList<Role.RolePrivilegesData> RolePrivileges { get; set; } 

        

        public class RolePrivilegesData
        {
            /// <summary>The name of the privilege.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("privilegeName")]
            public virtual string PrivilegeName { get; set; } 

            /// <summary>The obfuscated ID of the service this privilege is for.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("serviceId")]
            public virtual string ServiceId { get; set; } 

        }
    }    

    /// <summary>JSON template for roleAssignment resource in Directory API.</summary>
    public class RoleAssignment : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The unique ID of the user this role is assigned to.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("assignedTo")]
        public virtual string AssignedTo { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The type of the API resource. This is always admin#directory#roleAssignment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>If the role is restricted to an organization unit, this contains the ID for the organization unit
        /// the exercise of this role is restricted to.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("orgUnitId")]
        public virtual string OrgUnitId { get; set; } 

        /// <summary>ID of this roleAssignment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("roleAssignmentId")]
        public virtual System.Nullable<long> RoleAssignmentId { get; set; } 

        /// <summary>The ID of the role that is assigned.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("roleId")]
        public virtual System.Nullable<long> RoleId { get; set; } 

        /// <summary>The scope in which this role is assigned. Possible values are: - CUSTOMER - ORG_UNIT</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("scopeType")]
        public virtual string ScopeType { get; set; } 

    }    

    /// <summary>JSON response template for List roleAssignments operation in Directory API.</summary>
    public class RoleAssignments : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>A list of RoleAssignment resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<RoleAssignment> Items { get; set; } 

        /// <summary>The type of the API resource. This is always admin#directory#roleAssignments.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    /// <summary>JSON response template for List roles operation in Directory API.</summary>
    public class Roles : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>A list of Role resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Role> Items { get; set; } 

        /// <summary>The type of the API resource. This is always admin#directory#roles.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    /// <summary>JSON template for Schema resource in Directory API.</summary>
    public class Schema : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Fields of Schema</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fields")]
        public virtual System.Collections.Generic.IList<SchemaFieldSpec> Fields { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Unique identifier of Schema (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schemaId")]
        public virtual string SchemaId { get; set; } 

        /// <summary>Schema name</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schemaName")]
        public virtual string SchemaName { get; set; } 

    }    

    /// <summary>JSON template for FieldSpec resource for Schemas in Directory API.</summary>
    public class SchemaFieldSpec : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Unique identifier of Field (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fieldId")]
        public virtual string FieldId { get; set; } 

        /// <summary>Name of the field.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fieldName")]
        public virtual string FieldName { get; set; } 

        /// <summary>Type of the field.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fieldType")]
        public virtual string FieldType { get; set; } 

        /// <summary>Boolean specifying whether the field is indexed or not.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("indexed")]
        public virtual System.Nullable<bool> Indexed { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Boolean specifying whether this is a multi-valued field or not.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("multiValued")]
        public virtual System.Nullable<bool> MultiValued { get; set; } 

        /// <summary>Indexing spec for a numeric field. By default, only exact match queries will be supported for
        /// numeric fields. Setting the numericIndexingSpec allows range queries to be supported.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numericIndexingSpec")]
        public virtual SchemaFieldSpec.NumericIndexingSpecData NumericIndexingSpec { get; set; } 

        /// <summary>Read ACLs on the field specifying who can view values of this field. Valid values are
        /// "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("readAccessType")]
        public virtual string ReadAccessType { get; set; } 

        

        /// <summary>Indexing spec for a numeric field. By default, only exact match queries will be supported for
        /// numeric fields. Setting the numericIndexingSpec allows range queries to be supported.</summary>
        public class NumericIndexingSpecData
        {
            /// <summary>Maximum value of this field. This is meant to be indicative rather than enforced. Values
            /// outside this range will still be indexed, but search may not be as performant.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("maxValue")]
            public virtual System.Nullable<double> MaxValue { get; set; } 

            /// <summary>Minimum value of this field. This is meant to be indicative rather than enforced. Values
            /// outside this range will still be indexed, but search may not be as performant.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("minValue")]
            public virtual System.Nullable<double> MinValue { get; set; } 

        }
    }    

    /// <summary>JSON response template for List Schema operation in Directory API.</summary>
    public class Schemas : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>List of UserSchema objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("schemas")]
        public virtual System.Collections.Generic.IList<Schema> SchemasValue { get; set; } 

    }    

    /// <summary>JSON template for token resource in Directory API.</summary>
    public class Token : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether the application is registered with Google. The value is true if the application has an
        /// anonymous Client ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("anonymous")]
        public virtual System.Nullable<bool> Anonymous { get; set; } 

        /// <summary>The Client ID of the application the token is issued to.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("clientId")]
        public virtual string ClientId { get; set; } 

        /// <summary>The displayable name of the application the token is issued to.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("displayText")]
        public virtual string DisplayText { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The type of the API resource. This is always admin#directory#token.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Whether the token is issued to an installed application. The value is true if the application is
        /// installed to a desktop or mobile device.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nativeApp")]
        public virtual System.Nullable<bool> NativeApp { get; set; } 

        /// <summary>A list of authorization scopes the application is granted.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("scopes")]
        public virtual System.Collections.Generic.IList<string> Scopes { get; set; } 

        /// <summary>The unique ID of the user that issued the token.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("userKey")]
        public virtual string UserKey { get; set; } 

    }    

    /// <summary>JSON response template for List tokens operation in Directory API.</summary>
    public class Tokens : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>A list of Token resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Token> Items { get; set; } 

        /// <summary>The type of the API resource. This is always admin#directory#tokenList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

    }    

    /// <summary>JSON template for User object in Directory API.</summary>
    public class User : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("addresses")]
        public virtual System.Collections.Generic.IList<UserAddress> Addresses { get; set; } 

        /// <summary>Indicates if user has agreed to terms (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("agreedToTerms")]
        public virtual System.Nullable<bool> AgreedToTerms { get; set; } 

        /// <summary>List of aliases (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("aliases")]
        public virtual System.Collections.Generic.IList<string> Aliases { get; set; } 

        /// <summary>Boolean indicating if the user should change password in next login</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("changePasswordAtNextLogin")]
        public virtual System.Nullable<bool> ChangePasswordAtNextLogin { get; set; } 

        /// <summary>User's Google account creation time. (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("creationTime")]
        public virtual string CreationTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="CreationTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> CreationTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(CreationTimeRaw);
            }
            set
            {
                CreationTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Custom fields of the user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customSchemas")]
        public virtual System.Collections.Generic.IDictionary<string,System.Collections.Generic.IDictionary<string,object>> CustomSchemas { get; set; } 

        /// <summary>CustomerId of User (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customerId")]
        public virtual string CustomerId { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("deletionTime")]
        public virtual string DeletionTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="DeletionTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> DeletionTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(DeletionTimeRaw);
            }
            set
            {
                DeletionTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        [Newtonsoft.Json.JsonPropertyAttribute("emails")]
        public virtual System.Collections.Generic.IList<UserEmail> Emails { get; set; } 

        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("externalIds")]
        public virtual System.Collections.Generic.IList<UserExternalId> ExternalIds { get; set; } 

        /// <summary>Hash function name for password. Supported are MD5, SHA-1 and crypt</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("hashFunction")]
        public virtual string HashFunction { get; set; } 

        /// <summary>Unique identifier of User (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("ims")]
        public virtual System.Collections.Generic.IList<UserIm> Ims { get; set; } 

        /// <summary>Boolean indicating if user is included in Global Address List</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("includeInGlobalAddressList")]
        public virtual System.Nullable<bool> IncludeInGlobalAddressList { get; set; } 

        /// <summary>Boolean indicating if ip is whitelisted</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ipWhitelisted")]
        public virtual System.Nullable<bool> IpWhitelisted { get; set; } 

        /// <summary>Boolean indicating if the user is admin (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isAdmin")]
        public virtual System.Nullable<bool> IsAdmin { get; set; } 

        /// <summary>Boolean indicating if the user is delegated admin (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isDelegatedAdmin")]
        public virtual System.Nullable<bool> IsDelegatedAdmin { get; set; } 

        /// <summary>Is 2-step verification enforced (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isEnforcedIn2Sv")]
        public virtual System.Nullable<bool> IsEnforcedIn2Sv { get; set; } 

        /// <summary>Is enrolled in 2-step verification (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isEnrolledIn2Sv")]
        public virtual System.Nullable<bool> IsEnrolledIn2Sv { get; set; } 

        /// <summary>Is mailbox setup (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isMailboxSetup")]
        public virtual System.Nullable<bool> IsMailboxSetup { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>User's last login time. (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastLoginTime")]
        public virtual string LastLoginTimeRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="LastLoginTimeRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> LastLoginTime
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(LastLoginTimeRaw);
            }
            set
            {
                LastLoginTimeRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>User's name</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual UserName Name { get; set; } 

        /// <summary>List of non editable aliases (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nonEditableAliases")]
        public virtual System.Collections.Generic.IList<string> NonEditableAliases { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("notes")]
        public virtual object Notes { get; set; } 

        /// <summary>OrgUnit of User</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("orgUnitPath")]
        public virtual string OrgUnitPath { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("organizations")]
        public virtual System.Collections.Generic.IList<UserOrganization> Organizations { get; set; } 

        /// <summary>User's password</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("password")]
        public virtual string Password { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("phones")]
        public virtual System.Collections.Generic.IList<UserPhone> Phones { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("posixAccounts")]
        public virtual object PosixAccounts { get; set; } 

        /// <summary>username of User</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primaryEmail")]
        public virtual string PrimaryEmail { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("relations")]
        public virtual System.Collections.Generic.IList<UserRelation> Relations { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("sshPublicKeys")]
        public virtual object SshPublicKeys { get; set; } 

        /// <summary>Indicates if user is suspended</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("suspended")]
        public virtual System.Nullable<bool> Suspended { get; set; } 

        /// <summary>Suspension reason if user is suspended (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("suspensionReason")]
        public virtual string SuspensionReason { get; set; } 

        /// <summary>ETag of the user's photo (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("thumbnailPhotoEtag")]
        public virtual string ThumbnailPhotoEtag { get; set; } 

        /// <summary>Photo Url of the user (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("thumbnailPhotoUrl")]
        public virtual string ThumbnailPhotoUrl { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("websites")]
        public virtual System.Collections.Generic.IList<UserWebsite> Websites { get; set; } 

    }    

    /// <summary>JSON template for About (notes) of a user in Directory API.</summary>
    public class UserAbout : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>About entry can have a type which indicates the content type. It can either be plain or html. By
        /// default, notes contents are assumed to contain plain text.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("contentType")]
        public virtual string ContentType { get; set; } 

        /// <summary>Actual value of notes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for address.</summary>
    public class UserAddress : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Country.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("country")]
        public virtual string Country { get; set; } 

        /// <summary>Country code.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("countryCode")]
        public virtual string CountryCode { get; set; } 

        /// <summary>Custom type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customType")]
        public virtual string CustomType { get; set; } 

        /// <summary>Extended Address.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("extendedAddress")]
        public virtual string ExtendedAddress { get; set; } 

        /// <summary>Formatted address.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("formatted")]
        public virtual string Formatted { get; set; } 

        /// <summary>Locality.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("locality")]
        public virtual string Locality { get; set; } 

        /// <summary>Other parts of address.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("poBox")]
        public virtual string PoBox { get; set; } 

        /// <summary>Postal code.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("postalCode")]
        public virtual string PostalCode { get; set; } 

        /// <summary>If this is user's primary address. Only one entry could be marked as primary.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primary")]
        public virtual System.Nullable<bool> Primary { get; set; } 

        /// <summary>Region.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("region")]
        public virtual string Region { get; set; } 

        /// <summary>User supplied address was structured. Structured addresses are NOT supported at this time. You
        /// might be able to write structured addresses, but any values will eventually be clobbered.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sourceIsStructured")]
        public virtual System.Nullable<bool> SourceIsStructured { get; set; } 

        /// <summary>Street.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("streetAddress")]
        public virtual string StreetAddress { get; set; } 

        /// <summary>Each entry can have a type which indicates standard values of that entry. For example address could
        /// be of home, work etc. In addition to the standard type, an entry can have a custom type and can take any
        /// value. Such type should have the CUSTOM value as type and also have a customType value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for an email.</summary>
    public class UserEmail : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Email id of the user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("address")]
        public virtual string Address { get; set; } 

        /// <summary>Custom Type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customType")]
        public virtual string CustomType { get; set; } 

        /// <summary>If this is user's primary email. Only one entry could be marked as primary.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primary")]
        public virtual System.Nullable<bool> Primary { get; set; } 

        /// <summary>Each entry can have a type which indicates standard types of that entry. For example email could be
        /// of home, work etc. In addition to the standard type, an entry can have a custom type and can take any value
        /// Such types should have the CUSTOM value as type and also have a customType value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for an externalId entry.</summary>
    public class UserExternalId : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Custom type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customType")]
        public virtual string CustomType { get; set; } 

        /// <summary>The type of the Id.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The value of the id.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for instant messenger of an user.</summary>
    public class UserIm : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Custom protocol.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customProtocol")]
        public virtual string CustomProtocol { get; set; } 

        /// <summary>Custom type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customType")]
        public virtual string CustomType { get; set; } 

        /// <summary>Instant messenger id.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("im")]
        public virtual string Im { get; set; } 

        /// <summary>If this is user's primary im. Only one entry could be marked as primary.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primary")]
        public virtual System.Nullable<bool> Primary { get; set; } 

        /// <summary>Protocol used in the instant messenger. It should be one of the values from ImProtocolTypes map.
        /// Similar to type, it can take a CUSTOM value and specify the custom name in customProtocol field.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("protocol")]
        public virtual string Protocol { get; set; } 

        /// <summary>Each entry can have a type which indicates standard types of that entry. For example instant
        /// messengers could be of home, work etc. In addition to the standard type, an entry can have a custom type and
        /// can take any value. Such types should have the CUSTOM value as type and also have a customType
        /// value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON request template for setting/revoking admin status of a user in Directory API.</summary>
    public class UserMakeAdmin : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Boolean indicating new admin status of the user</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual System.Nullable<bool> Status { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for name of a user in Directory API.</summary>
    public class UserName : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Last Name</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("familyName")]
        public virtual string FamilyName { get; set; } 

        /// <summary>Full Name</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fullName")]
        public virtual string FullName { get; set; } 

        /// <summary>First Name</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("givenName")]
        public virtual string GivenName { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for an organization entry.</summary>
    public class UserOrganization : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The cost center of the users department.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("costCenter")]
        public virtual string CostCenter { get; set; } 

        /// <summary>Custom type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customType")]
        public virtual string CustomType { get; set; } 

        /// <summary>Department within the organization.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("department")]
        public virtual string Department { get; set; } 

        /// <summary>Description of the organization.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>The domain to which the organization belongs to.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domain")]
        public virtual string Domain { get; set; } 

        /// <summary>Location of the organization. This need not be fully qualified address.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("location")]
        public virtual string Location { get; set; } 

        /// <summary>Name of the organization</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>If it user's primary organization.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primary")]
        public virtual System.Nullable<bool> Primary { get; set; } 

        /// <summary>Symbol of the organization.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("symbol")]
        public virtual string Symbol { get; set; } 

        /// <summary>Title (designation) of the user in the organization.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("title")]
        public virtual string Title { get; set; } 

        /// <summary>Each entry can have a type which indicates standard types of that entry. For example organization
        /// could be of school, work etc. In addition to the standard type, an entry can have a custom type and can give
        /// it any name. Such types should have the CUSTOM value as type and also have a CustomType value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for a phone entry.</summary>
    public class UserPhone : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Custom Type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customType")]
        public virtual string CustomType { get; set; } 

        /// <summary>If this is user's primary phone or not.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primary")]
        public virtual System.Nullable<bool> Primary { get; set; } 

        /// <summary>Each entry can have a type which indicates standard types of that entry. For example phone could be
        /// of home_fax, work, mobile etc. In addition to the standard type, an entry can have a custom type and can
        /// give it any name. Such types should have the CUSTOM value as type and also have a customType
        /// value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>Phone number.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for Photo object in Directory API.</summary>
    public class UserPhoto : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Height in pixels of the photo</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("height")]
        public virtual System.Nullable<int> Height { get; set; } 

        /// <summary>Unique identifier of User (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Mime Type of the photo</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mimeType")]
        public virtual string MimeType { get; set; } 

        /// <summary>Base64 encoded photo data</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("photoData")]
        public virtual string PhotoData { get; set; } 

        /// <summary>Primary email of User (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primaryEmail")]
        public virtual string PrimaryEmail { get; set; } 

        /// <summary>Width in pixels of the photo</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("width")]
        public virtual System.Nullable<int> Width { get; set; } 

    }    

    /// <summary>JSON template for a POSIX account entry. Description of the field family: go/fbs-posix.</summary>
    public class UserPosixAccount : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The GECOS (user information) entry for this account.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("gecos")]
        public virtual string Gecos { get; set; } 

        /// <summary>The default group ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("gid")]
        public virtual System.Nullable<int> Gid { get; set; } 

        /// <summary>The path to the home directory for this account.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("homeDirectory")]
        public virtual string HomeDirectory { get; set; } 

        /// <summary>If this is user's primary account within the SystemId.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primary")]
        public virtual System.Nullable<bool> Primary { get; set; } 

        /// <summary>The path to the login shell for this account.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shell")]
        public virtual string Shell { get; set; } 

        /// <summary>System identifier for which account Username or Uid apply to.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("systemId")]
        public virtual string SystemId { get; set; } 

        /// <summary>The user ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("uid")]
        public virtual System.Nullable<int> Uid { get; set; } 

        /// <summary>The username of the account.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("username")]
        public virtual string Username { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for a relation entry.</summary>
    public class UserRelation : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Custom Type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customType")]
        public virtual string CustomType { get; set; } 

        /// <summary>The relation of the user. Some of the possible values are mother, father, sister, brother, manager,
        /// assistant, partner.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The name of the relation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for a POSIX account entry.</summary>
    public class UserSshPublicKey : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>An expiration time in microseconds since epoch.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expirationTimeUsec")]
        public virtual System.Nullable<long> ExpirationTimeUsec { get; set; } 

        /// <summary>A SHA-256 fingerprint of the SSH public key. (Read-only)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fingerprint")]
        public virtual string Fingerprint { get; set; } 

        /// <summary>An SSH public key.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("key")]
        public virtual string Key { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON request template to undelete a user in Directory API.</summary>
    public class UserUndelete : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>OrgUnit of User</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("orgUnitPath")]
        public virtual string OrgUnitPath { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON template for a website entry.</summary>
    public class UserWebsite : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Custom Type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customType")]
        public virtual string CustomType { get; set; } 

        /// <summary>If this is user's primary website or not.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primary")]
        public virtual System.Nullable<bool> Primary { get; set; } 

        /// <summary>Each entry can have a type which indicates standard types of that entry. For example website could
        /// be of home, work, blog etc. In addition to the standard type, an entry can have a custom type and can give
        /// it any name. Such types should have the CUSTOM value as type and also have a customType value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>Website.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>JSON response template for List Users operation in Apps Directory API.</summary>
    public class Users : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Kind of resource this is.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Token used to access next page of this result.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>Event that triggered this response (only used in case of Push Response)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("trigger_event")]
        public virtual string TriggerEvent { get; set; } 

        /// <summary>List of user objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("users")]
        public virtual System.Collections.Generic.IList<User> UsersValue { get; set; } 

    }    

    /// <summary>JSON template for verification codes in Directory API.</summary>
    public class VerificationCode : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The type of the resource. This is always admin#directory#verificationCode.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The obfuscated unique ID of the user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("userId")]
        public virtual string UserId { get; set; } 

        /// <summary>A current verification code for the user. Invalidated or used verification codes are not returned
        /// as part of the result.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("verificationCode")]
        public virtual string VerificationCodeValue { get; set; } 

    }    

    /// <summary>JSON response template for List verification codes operation in Directory API.</summary>
    public class VerificationCodes : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>A list of verification code resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<VerificationCode> Items { get; set; } 

        /// <summary>The type of the resource. This is always admin#directory#verificationCodesList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

    }
}
